Module: ZeroPush

Defined in:
lib/zero_push.rb,
lib/zero_push/client.rb,
lib/zero_push/version.rb,
lib/generators/zero_push/install_generator.rb

Defined Under Namespace

Classes: Client, InstallGenerator

Constant Summary collapse

VERSION =
'2.4.0'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.auth_tokenObject

Returns the value of attribute auth_token.



7
8
9
# File 'lib/zero_push.rb', line 7

def auth_token
  @auth_token
end

Class Method Details

.broadcast(params) ⇒ Object



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

def broadcast(params)
  client.broadcast(params)
end

.client(auth_token = self.auth_token) ⇒ Object



45
46
47
# File 'lib/zero_push.rb', line 45

def client(auth_token = self.auth_token)
  ZeroPush::Client.new(auth_token)
end

.inactive_tokensObject



41
42
43
# File 'lib/zero_push.rb', line 41

def inactive_tokens
  client.inactive_tokens
end

.notify(params) ⇒ Object



13
14
15
# File 'lib/zero_push.rb', line 13

def notify(params)
  client.notify(params)
end

.register(device_token, channel = nil) ⇒ Object



29
30
31
# File 'lib/zero_push.rb', line 29

def register(device_token, channel=nil)
  client.register(device_token, channel)
end

.set_badge(device_token, badge) ⇒ Object



37
38
39
# File 'lib/zero_push.rb', line 37

def set_badge(device_token, badge)
  client.set_badge(device_token, badge)
end

.subscribe(device_token, channel) ⇒ Object



21
22
23
# File 'lib/zero_push.rb', line 21

def subscribe(device_token, channel)
  client.subscribe(device_token, channel)
end

.unregister(device_token) ⇒ Object



33
34
35
# File 'lib/zero_push.rb', line 33

def unregister(device_token)
  client.unregister(device_token)
end

.unsubscribe(device_token, channel) ⇒ Object



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

def unsubscribe(device_token, channel)
  client.unsubscribe(device_token, channel)
end

.verify_credentialsObject



9
10
11
# File 'lib/zero_push.rb', line 9

def verify_credentials
  client.verify_credentials
end