Method: Urbanairship::Client#initialize
- Defined in:
- lib/urbanairship/client.rb
#initialize(key: required('key'), secret: nil, server: Urbanairship.configuration.server, token: nil, oauth: nil) ⇒ Object
Initialize the Client
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/urbanairship/client.rb', line 22 def initialize(key: required('key'), secret: nil, server: Urbanairship.configuration.server, token: nil, oauth: nil) @key = key @secret = secret @server = server @token = token @oauth = oauth if @oauth != nil && @token != nil raise ArgumentError.new("oauth and token can't both be used at the same time.") end end |