diff --git a/lib/onesignal/configuration.rb b/lib/onesignal/configuration.rb index 1ffb201..9daca57 100644 --- a/lib/onesignal/configuration.rb +++ b/lib/onesignal/configuration.rb @@ -39,6 +39,12 @@ class Configuration # OneSignal API token for User Authentication attr_accessor :user_key + # OneSignal Organization API Key + attr_accessor :organization_api_key + + # OneSignal REST API Key + attr_accessor :rest_api_key + # Set this to enable/disable debugging. When enabled (set to true), HTTP request/response # details will be logged with `logger.debug` (see the `logger` attribute). # Default to false. diff --git a/spec/configuration_spec.rb b/spec/configuration_spec.rb index 762a1e8..26764a4 100644 --- a/spec/configuration_spec.rb +++ b/spec/configuration_spec.rb @@ -39,4 +39,16 @@ end end end + + describe 'API keys' do + it 'should allow setting and retrieving organization_api_key' do + config.organization_api_key = 'test_org_key' + expect(config.organization_api_key).to eq('test_org_key') + end + + it 'should allow setting and retrieving rest_api_key' do + config.rest_api_key = 'test_rest_key' + expect(config.rest_api_key).to eq('test_rest_key') + end + end end