I'm getting an error that I believe is intrinsic to the gem (e.g. not a problem on my side) when trying to configure the library.
Currently using ruby 3.1.4
Running DingSDK::Ding.new gives the following error:
NameError: uninitialized constant DingSDK::Ding::SERVER_PRODUCTION
server = SERVER_PRODUCTION if server.nil?
^^^^^^^^^^^^^^^^^
from //gems/ding_sdk-0.7.4/lib/ding_sdk/ding.rb:53:in `initialize'
Passing in a server argument DingSDK::Ding.new(server: "beehiiv")
Gets you
TypeError: Parameter 'server_idx': Expected type T.nilable(Integer), got type String with value "beehiiv"
Trying passing in an integer gives the following error
TypeError: Parameter 'server': Expected type String, got type Integer with value 1
Additionally, I'm pretty sure the syntax for the setup steps given during onboarding is not correct, though the above errors keep me from fully validating.
s.config_security(
security=Shared::Security.new(
api_key="",
)
)
Shared::Security needs to be namespaced under DingSDK::Shared::Security, and values should probably be assigned here as attributes of a hash rather than security= based on my quick skim of the code.
Finally, it's pretty aggressive to require sorbet as a runtime dependency here, but I can work around that if the above works.
I'm getting an error that I believe is intrinsic to the gem (e.g. not a problem on my side) when trying to configure the library.
Currently using ruby 3.1.4
Running
DingSDK::Ding.newgives the following error:Passing in a server argument
DingSDK::Ding.new(server: "beehiiv")Gets you
Trying passing in an integer gives the following error
Additionally, I'm pretty sure the syntax for the setup steps given during onboarding is not correct, though the above errors keep me from fully validating.
Shared::Securityneeds to be namespaced underDingSDK::Shared::Security, and values should probably be assigned here as attributes of a hash rather thansecurity=based on my quick skim of the code.Finally, it's pretty aggressive to require sorbet as a runtime dependency here, but I can work around that if the above works.