-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Description
What happened?
The documentation says:
# Setup authorization
OneSignal.configure do |config|
# Configure Bearer authorization: organization_api_key
config.organization_api_key = 'ORGANIZATION_API_KEY' # Organization key is only required for creating new apps and other top-level endpoints
# Configure Bearer authorization: rest_api_key
config.rest_api_key = 'REST_API_KEY' # App REST API key required for most endpoints
end
But this code doesn't work in the onesignal v2.2.1 gem
Steps to reproduce?
Open `rails c` and run:
irb(main):001* OneSignal.configure do |config|
irb(main):002* # Configure Bearer authorization: organization_api_key
irb(main):003* config.organization_api_key = 'ORGANIZATION_API_KEY' # Organization key is only required for creating new apps and other top-level endpoints
irb(main):004* # Configure Bearer authorization: rest_api_key
irb(main):005* config.rest_api_key = 'REST_API_KEY' # App REST API key required for most endpoints
irb(main):006> end
irb(main):007>
(irb):3:in `block in <main>': undefined method `organization_api_key=' for an instance of OneSignal::Configuration (NoMethodError)
config.organization_api_key = 'ORGANIZATION_API_KEY' # Organization key is only required for creating new apps and other top-level endpoints
^^^^^^^^^^^^^^^^^^^^^^^
from (irb):1:in `<main>'What did you expect to happen?
I expect the documentation to give code that works.
Relevant log output
(irb):3:in `block in <main>': undefined method `organization_api_key=' for an instance of OneSignal::Configuration (NoMethodError)
config.organization_api_key = 'ORGANIZATION_API_KEY' # Organization key is only required for creating new apps and other top-level endpoints
^^^^^^^^^^^^^^^^^^^^^^^
from (irb):1:in `<main>'Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
No labels