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

Returns a new instance of ProvisionedClient.



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

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.



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

def app_id
  @app_id
end

#clientObject (readonly)

Returns the value of attribute client.



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

def client
  @client
end

Instance Method Details

#feedbackObject

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



36
37
38
# File 'lib/pyapns2.rb', line 36

def feedback
  client.feedback app_id
end

#inspectObject



40
41
42
# File 'lib/pyapns2.rb', line 40

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.



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

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