class PushWoosher::Device::Base

Public Instance Methods

device_type() click to toggle source
# File lib/push_woosher/device/base.rb, line 7
def device_type
  raise NotImplementedError
end
register() click to toggle source
# File lib/push_woosher/device/base.rb, line 26
def register
  post_action(
    path: 'registerDevice',
    request_hash: register_request_hash
  )
end
register_request_hash() click to toggle source
# File lib/push_woosher/device/base.rb, line 11
def register_request_hash
  {
    push_token: token,
    hwid: hwid,
    timezone: 0,
    device_type: device_type
  }
end
unregister() click to toggle source
# File lib/push_woosher/device/base.rb, line 33
def unregister
  post_action(
    path: 'unregisterDevice',
    request_hash: unregister_request_hash
  )
end
unregister_request_hash() click to toggle source
# File lib/push_woosher/device/base.rb, line 20
def unregister_request_hash
  {
    hwid: hwid
  }
end