apple_vpp 1.0.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MGRjNTMwZjAzYzU4NTU5ZTg4MDBjOWY2NzVkZjhlOTUwZGI4MGFjZA==
4
+ Zjk0ZjAzMTZlYWMwOGViZGJiZjYyN2EwY2MzOGQwZTgxZjZhZGRjNQ==
5
5
  data.tar.gz: !binary |-
6
- Y2RiMzFlZDUzZmQ5NzZkNjJlYWRjYTQ4MTlkYjQzM2FlZjFiNzkxMw==
6
+ NjEwNDZmZDBiMTBmMTllZmI2MmZmYzJlMzAyOTBjNTIyNzAxN2FmOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MjM0OTQ0MGUxY2Y3ODRkM2UwZWZlNTE2NDFlODczZjVkNDE0NTljZmE5Njk3
10
- ZjdmMzcyMDlmMGMxNTU4NDNhMTIyNTVmN2Y5Mzg3YTYxZjQ5MGQ0ZDM0ZjIy
11
- NzgwNDg4MTQ3NGY4MDg5MTk5ZTczM2IwZTdiMmQ2ZDk4ZTliNjU=
9
+ NjYzNzAwMzY4NTg3NjliNTk2YzFkYThlM2NhNWY0ZjQ2ZTJkZGQ0NjYxZmU5
10
+ M2M4YjgwM2NkYTgxNGNmMDZkNDY5M2NiODU3OGUxMGVmOTdmNWQ3NDVhMDk2
11
+ NzY4M2FmODhiYjM5MWJmMjhkODM5Y2Y4ODJmNjA4ZjllZDU1NzQ=
12
12
  data.tar.gz: !binary |-
13
- N2YwNTNkMGM2NzYwMzNjZWMyN2E0YWMyNTBjY2UwYjdlOTUwMzM5MmViMzAz
14
- NTMwM2JhMDQxYTZkOTg5MDA5NDRlYWMyODRlN2U3ZThhZDBhNGQ5NjRjNGFl
15
- ODkzZWJjMTllZDU3NmIzMjdhY2I0YjhjN2EyYTI0M2RhNTY0Njg=
13
+ OGZiMDNiNWQ4MjdhOGU5ZDAxNDYzMTkzNWMxNGVjMGIyODhhNzk4NjcxM2Uw
14
+ MWZjMmEwN2UwYjZmMjBhOWY1MGMzZDFjYzQ0ZTJmZjFkYjU2NzE0YmQxZGE4
15
+ OGVkYWIwZDI2MGI5NTQ5Mjc2MTYyMDI5NDQ1ZjIxNThiMmM0NDU=
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## 2.0.0
2
+
3
+ ### enhancements
4
+ * `.get_users` method includes `since_modified_token`. Users data now exists under `users` key.
5
+ * `.get_licenses` method includes `since_modified_token`. Licenses data now exists under `licenses` key.
data/README.md CHANGED
@@ -26,9 +26,9 @@ s_token = File.read './from_apple_portal.vpptoken'
26
26
 
27
27
  c = AppleVPP::Client.new s_token
28
28
 
29
- users_json = c.get_users
29
+ resp = c.get_users
30
30
 
31
- c.edit_user user_id: users_json.first[:user_id],
31
+ c.edit_user user_id: resp[:users].first[:user_id],
32
32
  email: 'youremail@example.org'
33
33
  ```
34
34
 
@@ -67,6 +67,7 @@ module AppleVPP
67
67
  def get_licenses(params = {})
68
68
  licenses = []
69
69
  batch_token = nil
70
+ since_modified_token = nil
70
71
 
71
72
  begin
72
73
 
@@ -82,10 +83,14 @@ module AppleVPP
82
83
  licenses.concat( resp['licenses'] ) if resp['licenses']
83
84
 
84
85
  batch_token = resp['batchToken']
86
+ since_modified_token = resp['sinceModifiedToken']
85
87
 
86
88
  end while batch_token
87
89
 
88
- AppleSerializer.to_ruby licenses
90
+ {
91
+ licenses: AppleSerializer.to_ruby(licenses),
92
+ since_modified_token: since_modified_token
93
+ }
89
94
  end
90
95
 
91
96
  def get_user(params = {})
@@ -131,6 +136,7 @@ module AppleVPP
131
136
  def get_users(params = {})
132
137
  users = []
133
138
  batch_token = nil
139
+ since_modified_token = nil
134
140
 
135
141
  begin
136
142
 
@@ -145,10 +151,14 @@ module AppleVPP
145
151
  users.concat( resp['users'] ) if resp['users']
146
152
 
147
153
  batch_token = resp['batchToken']
148
-
154
+ since_modified_token = resp['sinceModifiedToken']
155
+
149
156
  end while batch_token
150
157
 
151
- AppleSerializer.to_ruby users
158
+ {
159
+ users: AppleSerializer.to_ruby(users),
160
+ since_modified_token: since_modified_token
161
+ }
152
162
  end
153
163
 
154
164
  private
@@ -1,3 +1,3 @@
1
1
  module AppleVPP
2
- VERSION = "1.0.1"
2
+ VERSION = "2.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apple_vpp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taylor Boyko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-21 00:00:00.000000000 Z
11
+ date: 2013-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -75,6 +75,7 @@ extra_rdoc_files: []
75
75
  files:
76
76
  - .gitignore
77
77
  - .rspec
78
+ - CHANGELOG.md
78
79
  - Gemfile
79
80
  - LICENSE
80
81
  - LICENSE.txt