Class: Pyapns2::ProvisionedClient
- Inherits:
-
Object
- Object
- Pyapns2::ProvisionedClient
- Defined in:
- lib/pyapns2.rb
Instance Attribute Summary collapse
-
#app_id ⇒ Object
readonly
Returns the value of attribute app_id.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
-
#feedback ⇒ Object
See Pyapns2::Client#feedback, with the exception this version prefills in the app_id.
-
#initialize(client, app_id) ⇒ ProvisionedClient
constructor
A new instance of ProvisionedClient.
- #inspect ⇒ Object
-
#notify(token, notification = nil) ⇒ Object
See Pyapns2::Client#notify, with the exception this version prefills in the app_id.
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_id ⇒ Object (readonly)
Returns the value of attribute app_id.
23 24 25 |
# File 'lib/pyapns2.rb', line 23 def app_id @app_id end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
23 24 25 |
# File 'lib/pyapns2.rb', line 23 def client @client end |
Instance Method Details
#feedback ⇒ Object
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 |
#inspect ⇒ Object
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 |