dirigible 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b36b3346e8c2514e6726e129f10a6d2525afd203
4
- data.tar.gz: fc4b117b7004ac49010feb6c8e1896138fea24e9
3
+ metadata.gz: 5a257f35d1388cef0b5cd4d2f68b6019dc5476f4
4
+ data.tar.gz: 6ebfc55d2e1f49254c37a722da78aada9ade089b
5
5
  SHA512:
6
- metadata.gz: 8a2ffb0992991d31abc166565cbab34c7a57a848c958248a453e1b9deed080e8833f0b33c51bfa384a3265dac4dc0e5b41feb92caedbe165c7da230845f7b95e
7
- data.tar.gz: 4f66cd85d0e7743b175c94e9419af128bf949e72bb4f98cec083d1f9f3ced2f73b98370f2cdcb60ea9ddfbae2c0fabf4da5d229a447a77be1d17be4756dff65c
6
+ metadata.gz: 6228c89d0ca39ad5afecc068e31825973a697d91483f983332c28cb96e75cf4231aba8caff41aa0597f4a9f54258fae031f323deca63ec4e845ef12165a6ca3f
7
+ data.tar.gz: 6742f3510312827e7284683aeb1441c7f728b144f6c3c3fe08a260622dc4f7ee1ec1f4ce67e1174d8bd2afc5d7c5c743e865e2fafa1a3b9e4428054ea3c39b55
data/README.md CHANGED
@@ -108,9 +108,10 @@ end
108
108
  * [Get Backberry PIN device information](http://rdoc.info/github/anthonator/dirigible/master/Dirigible/DeviceInformation.get_device_pin)
109
109
  * [Get iOS device token information](http://rdoc.info/github/anthonator/dirigible/master/Dirigible/DeviceInformation.get_device_token)
110
110
  * [List Android APID's registered to an application](http://rdoc.info/github/anthonator/dirigible/master/Dirigible/DeviceInformation.list_apids)
111
- * [List Blackberry PIN's registered to an application](http://rdoc.info/github/anthonator/dirigible/master/Dirigible/DeviceInformation.list_device_pin)
112
- * [List iOS device tokens registered to an application](http://rdoc.info/github/anthonator/dirigible/master/Dirigible/DeviceInformation.list_device_token)
113
- * [List device tokens that can't recieve messages](http://rdoc.info/github/anthonator/dirigible/master/Dirigible/DeviceInformation.device_token_feedback)
111
+ * [List Blackberry PIN's registered to an application](http://rdoc.info/github/anthonator/dirigible/master/Dirigible/DeviceInformation.list_device_pins)
112
+ * [Count iOS device tokens registered to an application](http://rdoc.info/github/anthonator/dirigible/master/Dirigible/DeviceInformation.count_device_tokens)
113
+ * [List iOS device tokens registered to an application](http://rdoc.info/github/anthonator/dirigible/master/Dirigible/DeviceInformation.list_device_tokens)
114
+ * [List iOS device tokens that can't recieve messages](http://rdoc.info/github/anthonator/dirigible/master/Dirigible/DeviceInformation.device_token_feedback)
114
115
 
115
116
  ### Device Registration
116
117
 
data/dirigible.gemspec CHANGED
@@ -21,6 +21,5 @@ Gem::Specification.new do |spec|
21
21
  # Runtime dependencies
22
22
  spec.add_dependency "faraday", "~> 0.8.0"
23
23
  spec.add_dependency "faraday_middleware", "~> 0.9"
24
- spec.add_dependency "hashie", "~> 2.0"
25
24
  spec.add_dependency "multi_json", "~> 1.8"
26
25
  end
@@ -31,6 +31,18 @@ class Dirigible::DeviceInformation
31
31
  Dirigible.get("/device_pins/#{id}")
32
32
  end
33
33
 
34
+ # Count iOS device tokens registered to this application
35
+ #
36
+ # @example Example request:
37
+ # Dirigible::DeviceInformation.count_device_tokens[:device_tokens_count]
38
+ # Dirigible::DeviceInformation.count_device_tokens[:active_device_tokens_count]
39
+ #
40
+ # @see http://docs.urbanairship.com/reference/api/v3/device_information.html#device-listing
41
+ def self.count_device_tokens
42
+ Dirigible.get("/device_tokens/count")
43
+ end
44
+
45
+
34
46
  # Fetch iOS device tokens registered to this application
35
47
  # and associated metadata.
36
48
  #
@@ -43,7 +55,7 @@ class Dirigible::DeviceInformation
43
55
  #
44
56
  # @see http://docs.urbanairship.com/reference/api/v3/device_information.html#device-listing
45
57
  def self.list_device_tokens(options = {})
46
- List.new(Dirigible.get('/device_tokens', params))
58
+ List.new(Dirigible.get('/device_tokens', options))
47
59
  end
48
60
 
49
61
  # Fetch Android APIDs registered to this application and
@@ -58,7 +70,7 @@ class Dirigible::DeviceInformation
58
70
  #
59
71
  # @see http://docs.urbanairship.com/reference/api/v3/device_information.html#device-listing
60
72
  def self.list_apids(options = {})
61
- List.new(Dirigible.get('/apids', params))
73
+ List.new(Dirigible.get('/apids', options))
62
74
  end
63
75
 
64
76
  # Fetch BlackBerry PINs registered to this application and
@@ -73,7 +85,7 @@ class Dirigible::DeviceInformation
73
85
  #
74
86
  # @see http://docs.urbanairship.com/reference/api/v3/device_information.html#device-listing
75
87
  def self.list_device_pins(options = {})
76
- List.new(Dirigible.get('/device_pins', params))
88
+ List.new(Dirigible.get('/device_pins', options))
77
89
  end
78
90
 
79
91
  # Fetch device tokens that can't recieve messages because
@@ -101,7 +113,7 @@ class Dirigible::DeviceInformation
101
113
  def next_page(params = {})
102
114
  return nil if @response[:next_page].nil?
103
115
  uri = URI.parse(@response[:next_page])
104
- path = "/#{uri.path.gsub(/\/api|\//, '')}"
116
+ path = "/#{uri.path.gsub(/\/api\/|\//, '')}"
105
117
  # Shew! Need to simplify this!
106
118
  params = (CGI.parse(uri.query).map{ |k,v| { k => v[0] } }.reduce({}) { |h,pairs| pairs.each { |k,v| (h[k.to_sym] = v) }; h }).merge!(params)
107
119
  List.new(Dirigible.get(path, params))
@@ -1,3 +1,3 @@
1
1
  module Dirigible
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
data/lib/dirigible.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  require 'faraday'
2
2
  require 'faraday_middleware'
3
- require 'hashie'
4
3
  require 'multi_json'
5
4
 
6
5
  require 'dirigible/version'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dirigible
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anthony Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-08 00:00:00.000000000 Z
11
+ date: 2014-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0.9'
41
- - !ruby/object:Gem::Dependency
42
- name: hashie
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '2.0'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '2.0'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: multi_json
57
43
  requirement: !ruby/object:Gem::Requirement