Class: Pyapns2::ProvisionedClient

Inherits:
Object
  • Object
show all
Defined in:
lib/pyapns2.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, app_id) ⇒ ProvisionedClient



16
17
18
19
# File 'lib/pyapns2.rb', line 16

def initialize(client, app_id)
  @client = client
  @app_id = app_id
end

Instance Attribute Details

#app_idObject (readonly)

Returns the value of attribute app_id.



14
15
16
# File 'lib/pyapns2.rb', line 14

def app_id
  @app_id
end

#clientObject (readonly)

Returns the value of attribute client.



14
15
16
# File 'lib/pyapns2.rb', line 14

def client
  @client
end

Instance Method Details

#feedbackObject

See Pyapns2::Client#feedback, with the exception this version prefills in the app_id.



27
28
29
# File 'lib/pyapns2.rb', line 27

def feedback
  client.feedback app_id
end

#inspectObject



31
32
33
# File 'lib/pyapns2.rb', line 31

def inspect
  "#<#{self.class.name} server=#{host}:#{port}, app_id=#{app_id}>"
end

#notify(token, notification = nil) ⇒ Object

See Pyapns2::Client#notify, with the exception this version prefills in the app_id.



22
23
24
# File 'lib/pyapns2.rb', line 22

def notify(token, notification = nil)
  client.notify app_id, token, notification
end