class Urbanairship::Devices::DeviceToken

Public Class Methods

new(client: required('client')) click to toggle source
# File lib/urbanairship/devices/devicelist.rb, line 58
def initialize(client: required('client'))
  @client = client
end

Public Instance Methods

lookup(token: required('token')) click to toggle source
# File lib/urbanairship/devices/devicelist.rb, line 62
def lookup(token: required('token'))
  fail ArgumentError, 'token needs to be a string' unless token.is_a? String

  resp = @client.send_request(
    method: 'GET',
    path: device_token_path(token)
  )
  logger.info("Looking up info on device token #{token}")
  resp
end