Module: JPush::Config

Extended by:
Config
Included in:
Config
Defined in:
lib/jpush/config.rb

Constant Summary collapse

DEFAULT_OPTIONS =
{
  api_version: 'v3',
  push_api_host: 'https://api.jpush.cn/',
  device_api_host: 'https://device.jpush.cn/',
  report_api_host: 'https://report.jpush.cn/',
  valid_platform: ['android', 'ios']
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#settingsObject (readonly)

Returns the value of attribute settings.



13
14
15
# File 'lib/jpush/config.rb', line 13

def settings
  @settings
end

Instance Method Details

#init(app_key, master_secret) ⇒ Object



15
16
17
# File 'lib/jpush/config.rb', line 15

def init(app_key, master_secret)
  @settings = DEFAULT_OPTIONS.merge!(app_key: app_key, master_secret: master_secret)
end