github_api_v3 0.2.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +52 -2
  3. data/lib/github_api_v3/client/events.rb +3 -2
  4. data/lib/github_api_v3/client/feeds.rb +21 -0
  5. data/lib/github_api_v3/client/orgs.rb +40 -0
  6. data/lib/github_api_v3/client/repos.rb +101 -10
  7. data/lib/github_api_v3/client/users.rb +102 -1
  8. data/lib/github_api_v3/client.rb +16 -12
  9. data/lib/github_api_v3/default.rb +4 -1
  10. data/lib/github_api_v3/version.rb +1 -1
  11. data/spec/cassettes/GitHub_Client_Feeds/_feeds/returns_feed_information.json +1 -0
  12. data/spec/cassettes/GitHub_Client_Orgs/_organization/returns_an_organization.json +1 -0
  13. data/spec/cassettes/GitHub_Client_Repos/_star/stars_a_repository.json +1 -0
  14. data/spec/cassettes/GitHub_Client_Repos/_stargazers/returns_a_list_of_stargazers.json +1 -0
  15. data/spec/cassettes/GitHub_Client_Repos/_subscribe/subscribes_to_a_repository.json +1 -0
  16. data/spec/cassettes/GitHub_Client_Repos/_subscription/returns_subscription_information.json +1 -0
  17. data/spec/cassettes/GitHub_Client_Repos/_unstar/unstars_a_repository.json +1 -0
  18. data/spec/cassettes/GitHub_Client_Repos/_unsubscribe/unsubscribes_to_a_repository.json +1 -0
  19. data/spec/cassettes/GitHub_Client_Repos/_watchers/returns_a_list_of_watchers.json +1 -0
  20. data/spec/cassettes/GitHub_Client_Users/_notifications/returns_an_array_of_notifications.json +1 -0
  21. data/spec/cassettes/GitHub_Client_Users/_organizations/returns_an_authenticated_users_organizations.json +1 -0
  22. data/spec/cassettes/GitHub_Client_Users/_organizations/returns_an_unauthenticated_users_organizations.json +1 -0
  23. data/spec/cassettes/GitHub_Client_Users/_repo_notifications/returns_an_array_of_notifications.json +1 -0
  24. data/spec/cassettes/GitHub_Client_Users/_starring/returns_a_404_for_not_found.json +1 -0
  25. data/spec/cassettes/GitHub_Client_Users/_starring/returns_an_authenticated_users_repos.json +1 -0
  26. data/spec/cassettes/GitHub_Client_Users/_starring/returns_an_unauthenticated_users_repos.json +1 -0
  27. data/spec/cassettes/GitHub_Client_Users/_watching/returns_a_404_for_not_found.json +1 -0
  28. data/spec/cassettes/GitHub_Client_Users/_watching/returns_an_authenticated_users_repos.json +1 -0
  29. data/spec/cassettes/GitHub_Client_Users/_watching/returns_an_unauthenticated_users_repos.json +1 -0
  30. data/spec/github_api_v3/client/feeds_spec.rb +12 -0
  31. data/spec/github_api_v3/client/orgs_spec.rb +11 -0
  32. data/spec/github_api_v3/client/repos_spec.rb +43 -0
  33. data/spec/github_api_v3/client/users_spec.rb +50 -0
  34. metadata +47 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5879c45d69fb3c4f4c5a6fd231b5caca7997556e
4
- data.tar.gz: f02eac1f8a7ee0be4bc8b01234c38166100786f3
3
+ metadata.gz: b174ba6631f8a18949be210fde68c58db532c923
4
+ data.tar.gz: 695b2e2663d78740463a3052c5dc390419c77aa9
5
5
  SHA512:
6
- metadata.gz: d1b92eb0e6139fde743e754ed26c554800ca4e02efd5fb230c36e235de4700a175bbcd8df7d15a4f5e88b7ad186c1dd8a029451d8720e2d96a07b4170f63c905
7
- data.tar.gz: ef1e8ca267a335307901001d6c73d55a27b518c764e5401212dae85ce1019b4ad6ab12f1e15baa205a9233c4fe67436058588ef0ed43c1c85bbf684701ddffe0
6
+ metadata.gz: 0c8fca2eee4cc89fdd7b15057fb00cd2626e52bf006b245e3b28691b6f6a4492e592c15ff96ad1b9f67c2c63578c25d442ce33360ff5bcc84dbc4828655f3a36
7
+ data.tar.gz: 7b8d3bf9fe0a0446716a5fbe5e46268a61dae9ba0d09d95ad21aee70d4e8f2a14ec3be7f4d5d17e255b9e566f18288fd61dc54a89af33fe30b9903702bf39584
data/README.md CHANGED
@@ -83,6 +83,13 @@ client.following?('caseyscarborough')
83
83
  # Get events for a user
84
84
  GitHub.events('caseyscarborough')
85
85
 
86
+ # Get notifications for a user
87
+ client.notifications
88
+
89
+ # Get repositories watching/starring for a user
90
+ client.watching
91
+ client.starring
92
+
86
93
  # etc...
87
94
  ```
88
95
  You can find the available attributes [here](http://developer.github.com/v3/users/#get-a-single-user). Check the [Users documentation](http://rdoc.info/gems/github_api_v3/GitHub/Client/Users) for the gem for a complete list and more examples.
@@ -121,9 +128,38 @@ GitHub.branch('caseyscarborough','github','master')
121
128
  # Add/remove collaborator
122
129
  client.add_collaborator('owner','repo-name','user-to-add')
123
130
  client.remove_collaborator('owner','repo-name','user-to-remove')
131
+
132
+ # Subscribe/unsubscribe/star/unstar a repository
133
+ client.subscribe('caseyscarborough','github')
134
+ client.unsubscribe('caseyscarborough','github')
135
+ client.star('caseyscarborough','github')
136
+ client.unstar('caseyscarborough','github')
137
+
138
+ # etc...
124
139
  ```
140
+
125
141
  For a full list with descriptions, see the [Repos documentation](http://rdoc.info/gems/github_api_v3/GitHub/Client/Repos) for the gem.
126
142
 
143
+ #### Events
144
+
145
+ The following are some sample usages of the Events module.
146
+
147
+ ```ruby
148
+ # Get all events for a user
149
+ GitHub.user_events('caseyscarborough')
150
+
151
+ # Get public events for a user
152
+ GitHub.public_user_events('caseyscarborough')
153
+
154
+ # Get all public GitHub events
155
+ GitHub.public_events
156
+
157
+ # Get all events for a repository
158
+ GitHub.repo_events('owner','repo-name')
159
+
160
+ # etc...
161
+ ```
162
+
127
163
  #### Gists
128
164
 
129
165
  The following are sample uses for the Gists module.
@@ -156,6 +192,8 @@ client.star_gist(1234567)
156
192
  client.unstar_gist(1234567)
157
193
  client.fork_gist(1234567)
158
194
  client.delete_gist(1234567)
195
+
196
+ # etc...
159
197
  ```
160
198
  Check out the [Gist documentation](http://rdoc.info/gems/github_api_v3/GitHub/Client/Gists) for more information.
161
199
 
@@ -171,13 +209,25 @@ GitHub.markdown('# Markdown text!')
171
209
  GitHub.markdown(File.read('markdown.md'))
172
210
  ```
173
211
 
212
+ #### Gitignore
213
+
214
+ You can retrieve .gitignore templates using the Gitignore API as well.
215
+
216
+ ```ruby
217
+ GitHub.gitignore_list
218
+ # => ["Actionscript", "Android", "C", "C++", "CSharp"...]
219
+
220
+ # Retrieve a specific template
221
+ GitHub.gitignore("Ruby")
222
+ # => {"name"=>"Ruby", "source"=>"*.gem\n*.rbc\n.bundle...}
223
+ ```
224
+
174
225
  ## Running the Test Suite
175
226
 
176
227
  Begin by renaming the config.sample.yml file to config.yml and add your information to it. You can get a proper authorization key by issuing the following command with your username and password:
177
228
 
178
229
  ```bash
179
- $ curl -i -u "username:password" \
180
- https://api.github.com/authorizations \
230
+ $ curl -i -u "username:password" https://api.github.com/authorizations \
181
231
  -d '{"scopes":["delete_repo", "user", "public_repo", "repo", "gist"]}'
182
232
  ```
183
233
 
@@ -11,10 +11,11 @@ module GitHub
11
11
  # @return [Array] Array of events.
12
12
  # @see http://developer.github.com/v3/activity/events/#list-public-events
13
13
  # @example
14
- # GitHub.public_events
15
- def public_events
14
+ # GitHub.events
15
+ def events
16
16
  get '/events'
17
17
  end
18
+ alias :public_events :events
18
19
 
19
20
  # List repository events.
20
21
  #
@@ -0,0 +1,21 @@
1
+ module GitHub
2
+ class Client
3
+
4
+ # Methods for the Feeds API, which looks pretty much useless.
5
+ #
6
+ # http://developer.github.com/v3/activity/feeds/
7
+ module Feeds
8
+
9
+ # List feeds.
10
+ #
11
+ # Requires authentication
12
+ # @return [Hash] Feed information.
13
+ # @see http://developer.github.com/v3/activity/feeds/#list-feeds
14
+ def feeds
15
+ get "/feeds", auth_params
16
+ end
17
+
18
+ end
19
+
20
+ end
21
+ end
@@ -0,0 +1,40 @@
1
+ module GitHub
2
+ class Client
3
+
4
+ # Methods for the Orgs API.
5
+ #
6
+ # @see http://developer.github.com/v3/orgs/
7
+ module Orgs
8
+
9
+ # Get an organization.
10
+ #
11
+ # @param org [String] Organization name.
12
+ # @return [Hash] Organization information.
13
+ # @see http://developer.github.com/v3/orgs/#get-an-organization
14
+ # @example
15
+ # GitHub.organization('github')
16
+ def organization(org)
17
+ get "/orgs/#{org}", auth_params
18
+ end
19
+
20
+ # Edit an organization.
21
+ #
22
+ # Requires authentication.
23
+ # @param org [String] Organization name.
24
+ # @param options [Hash] Optional parameters.
25
+ # @option options [String] :billing_email Billing email address, is not publicized.
26
+ # @option options [String] :company
27
+ # @option options [String] :email Publicly visible email address
28
+ # @option options [String] :location
29
+ # @option options [String] :name
30
+ # @return [Hash] Repository information.
31
+ # @see http://developer.github.com/v3/orgs/#edit-an-organization
32
+ # @example
33
+ # client.edit_organization('facebook',name:'faceeebooook',location:'California')
34
+ def edit_organization(org, options={})
35
+ patch "/orgs/#{org}", auth_params, options
36
+ end
37
+ end
38
+
39
+ end
40
+ end
@@ -13,7 +13,7 @@ module GitHub
13
13
  # @return [Array]
14
14
  # @see http://developer.github.com/v3/repos/#list-all-public-repositories
15
15
  def all_repos
16
- get '/repositories'
16
+ get '/repositories', auth_params
17
17
  end
18
18
 
19
19
  # Get one repository.
@@ -25,7 +25,7 @@ module GitHub
25
25
  # @example
26
26
  # GitHub.repo('caseyscarborough','github')
27
27
  def repo(owner, repo)
28
- get "/repos/#{owner}/#{repo}"
28
+ get "/repos/#{owner}/#{repo}", auth_params
29
29
  end
30
30
 
31
31
  # Get all repositories for a user.
@@ -115,7 +115,7 @@ module GitHub
115
115
  # @example
116
116
  # GitHub.org_repos('rails')
117
117
  def org_repos(org)
118
- get "/orgs/#{org}/repos"
118
+ get "/orgs/#{org}/repos", auth_params
119
119
  end
120
120
 
121
121
  # List contributors for a repository.
@@ -127,7 +127,7 @@ module GitHub
127
127
  # @example
128
128
  # GitHub.contributors('caseyscarborough','github')
129
129
  def contributors(owner, repo)
130
- get "/repos/#{owner}/#{repo}/contributors"
130
+ get "/repos/#{owner}/#{repo}/contributors", auth_params
131
131
  end
132
132
 
133
133
  # List languages for a repository.
@@ -139,7 +139,7 @@ module GitHub
139
139
  # @example
140
140
  # GitHub.languages('caseyscarborough','github')
141
141
  def languages(owner, repo)
142
- get "/repos/#{owner}/#{repo}/languages"
142
+ get "/repos/#{owner}/#{repo}/languages", auth_params
143
143
  end
144
144
 
145
145
  # def teams(owner, repo)
@@ -155,7 +155,7 @@ module GitHub
155
155
  # @example
156
156
  # GitHub.tags('caseyscarborough','github')
157
157
  def tags(owner, repo)
158
- get "/repos/#{owner}/#{repo}/tags"
158
+ get "/repos/#{owner}/#{repo}/tags", auth_params
159
159
  end
160
160
 
161
161
  # List branches for a repository.
@@ -167,7 +167,7 @@ module GitHub
167
167
  # @example
168
168
  # GitHub.branches('caseyscarborough','github')
169
169
  def branches(owner, repo)
170
- get "/repos/#{owner}/#{repo}/branches"
170
+ get "/repos/#{owner}/#{repo}/branches", auth_params
171
171
  end
172
172
 
173
173
  # Get information about a branch.
@@ -179,7 +179,7 @@ module GitHub
179
179
  # @example
180
180
  # GitHub.branch('caseyscarborough','github','master')
181
181
  def branch(owner, repo, branch)
182
- get "/repos/#{owner}/#{repo}/branches/#{branch}"
182
+ get "/repos/#{owner}/#{repo}/branches/#{branch}", auth_params
183
183
  end
184
184
 
185
185
  # Get list of collaborators for a repository.
@@ -191,7 +191,7 @@ module GitHub
191
191
  # @example
192
192
  # GitHub.collaborators('caseyscarborough','github')
193
193
  def collaborators(owner, repo)
194
- get "/repos/#{owner}/#{repo}/collaborators"
194
+ get "/repos/#{owner}/#{repo}/collaborators", auth_params
195
195
  end
196
196
 
197
197
  # Determine if a user is a collaborator to a repository.
@@ -204,7 +204,7 @@ module GitHub
204
204
  # @example
205
205
  # GitHub.collaborator?('caseyscarborough','github','caseyscarborough')
206
206
  def collaborator?(owner, repo, user)
207
- boolean_get "/repos/#{owner}/#{repo}/collaborators/#{user}"
207
+ boolean_get "/repos/#{owner}/#{repo}/collaborators/#{user}", auth_params
208
208
  end
209
209
 
210
210
  # Add a collaborator to a repository.
@@ -214,6 +214,7 @@ module GitHub
214
214
  # @param owner [String] Repository owner.
215
215
  # @param repo [String] Repository name.
216
216
  # @param user [String] User to add.
217
+ # @return [Boolean] True if successful, false if not.
217
218
  # @see http://developer.github.com/v3/repos/collaborators/#add-collaborator
218
219
  def add_collaborator(owner, repo, user)
219
220
  boolean_put "/repos/#{owner}/#{repo}/collaborators/#{user}", auth_params
@@ -226,11 +227,101 @@ module GitHub
226
227
  # @param owner [String] Repository owner.
227
228
  # @param repo [String] Repository name.
228
229
  # @param user [String] User to remove.
230
+ # @return [Boolean] True if successful, false if not.
229
231
  # @see http://developer.github.com/v3/repos/collaborators/#remove-collaborator
230
232
  def remove_collaborator(owner, repo, user)
231
233
  boolean_delete "/repos/#{owner}/#{repo}/collaborators/#{user}", auth_params
232
234
  end
233
235
 
236
+ # List Stargazers for a repository.
237
+ #
238
+ # @param owner [String] Repository owner.
239
+ # @param repo [String] Repository name.
240
+ # @return [Array] List of users.
241
+ # @see http://developer.github.com/v3/activity/starring/#list-stargazers
242
+ # @example
243
+ # GitHub.stargazers('caseyscarborough','github')
244
+ def stargazers(owner, repo)
245
+ get "/repos/#{owner}/#{repo}/stargazers", auth_params
246
+ end
247
+
248
+ # Star a repository.
249
+ #
250
+ # Requires authentication.
251
+ #
252
+ # @param owner [String] Repository owner.
253
+ # @param repo [String] Repository name.
254
+ # @return [Boolean] True if successful, false if not.
255
+ # @see http://developer.github.com/v3/activity/starring/#star-a-repository
256
+ def star(owner, repo)
257
+ boolean_put "/user/starred/#{owner}/#{repo}", auth_params
258
+ end
259
+
260
+ # Unstar a repository.
261
+ #
262
+ # Requires authentication.
263
+ #
264
+ # @param owner [String] Repository owner.
265
+ # @param repo [String] Repository name.
266
+ # @return [Boolean] True if successful, false if not.
267
+ # @see http://developer.github.com/v3/activity/starring/#unstar-a-repository
268
+ def unstar(owner, repo)
269
+ boolean_delete "/user/starred/#{owner}/#{repo}", auth_params
270
+ end
271
+
272
+ # List Watchers for a repository.
273
+ #
274
+ # @param owner [String] Repository owner.
275
+ # @param repo [String] Repository name.
276
+ # @return [Array] List of users.
277
+ # @see http://developer.github.com/v3/activity/watching/#list-watchers
278
+ def watchers(owner, repo)
279
+ get "/repos/#{owner}/#{repo}/subscribers", auth_params
280
+ end
281
+
282
+ # Get subscription information.
283
+ #
284
+ # Requires authentication.
285
+ #
286
+ # @param owner [String] Repository owner.
287
+ # @param repo [String] Repository name.
288
+ # @return [Hash] Subscription information.
289
+ # @see http://developer.github.com/v3/activity/watching/#get-a-repository-subscription
290
+ # @example
291
+ # client.subscription('caseyscarborough','github')
292
+ def subscription(owner, repo)
293
+ get "/repos/#{owner}/#{repo}/subscription", auth_params
294
+ end
295
+
296
+ # Set a repository subscription.
297
+ #
298
+ # Requires authentication.
299
+ #
300
+ # @param owner [String] Repository owner.
301
+ # @param repo [String] Repository name.
302
+ # @return [Hash] Subscription information.
303
+ # @see http://developer.github.com/v3/activity/watching/#set-a-repository-subscription
304
+ # @example
305
+ # client.subscribe('caseyscarborough','github')
306
+ def subscribe(owner, repo, options={})
307
+ options[:subscribed] = true unless options[:subscribed]
308
+ options[:ignored] = false unless options[:ignored]
309
+ put "/repos/#{owner}/#{repo}/subscription", auth_params, options
310
+ end
311
+
312
+ # Delete a repository subscription.
313
+ #
314
+ # Requires authentication.
315
+ #
316
+ # @param repo [String] Repository name.
317
+ # @return [Hash] Subscription information.
318
+ # @see http://developer.github.com/v3/activity/watching/#delete-a-repository-subscription
319
+ # @example
320
+ # client.unsubscribe('caseyscarborough','github')
321
+ def unsubscribe(owner, repo)
322
+ boolean_delete "/repos/#{owner}/#{repo}/subscription", auth_params
323
+ end
324
+
234
325
  end
235
326
  end
236
327
  end
@@ -197,7 +197,108 @@
197
197
  def delete_key(id)
198
198
  boolean_delete "/user/keys/#{id}", auth_params
199
199
  end
200
-
200
+
201
+ # List notifications.
202
+ #
203
+ # Requires authentication.
204
+ #
205
+ # @param options [Hash] Optional parameters.
206
+ # @option options [Boolean] :all Show notifications marked as read.
207
+ # @option options [Boolean] :participating Show only notifications that the user is participating in or mentioned in.
208
+ # @option options [String] :time Only show notifications since a given time. Should be in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ), such as: “2012-10-09T23:39:01Z”.
209
+ # @return [Array] List of notifications.
210
+ # @see http://developer.github.com/v3/activity/notifications/#list-your-notifications
211
+ # @example
212
+ # client.notifications
213
+ def notifications(options={})
214
+ get "/notifications", auth_params.merge(options)
215
+ end
216
+
217
+ # List notifications for a repository.
218
+ #
219
+ # Requires authentication.
220
+ #
221
+ # @param owner [String] Repository owner.
222
+ # @param repo [String] Repository name.
223
+ # @param options [Hash] Optional parameters.
224
+ # @option options [Boolean] :all Show notifications marked as read.
225
+ # @option options [Boolean] :participating Show only notifications that the user is participating in or mentioned in.
226
+ # @option options [String] :time Only show notifications since a given time. Should be in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ), such as: “2012-10-09T23:39:01Z”.
227
+ # @return [Array] List of notifications.
228
+ # @see http://developer.github.com/v3/activity/notifications/#list-your-notifications-in-a-repository
229
+ # @example
230
+ # client.repo_notifications('caseyscarborough','github')
231
+ def repo_notifications(owner, repo, options={})
232
+ get "/repos/#{owner}/#{repo}/notifications", auth_params
233
+ end
234
+
235
+ # List repositories a user is starring.
236
+ #
237
+ # Can be used unauthenticated or authenticated.
238
+ #
239
+ # @param username [String] The target user's username.
240
+ # @return [Array]
241
+ # @see http://developer.github.com/v3/activity/starring/#list-repositories-being-starred
242
+ # @example
243
+ # GitHub.starring('caseyscarborough')
244
+ # @example
245
+ # client.starring
246
+ def starring(username=nil)
247
+ if username
248
+ get "/users/#{username}/starred"
249
+ else
250
+ get "/user/starred", auth_params
251
+ end
252
+ end
253
+
254
+ # Check if you are starring a repository.
255
+ #
256
+ # Requires authentication.
257
+ #
258
+ # @param owner [String] Repository owner.
259
+ # @param repo [String] Repository name.
260
+ # @return [Boolean] True if successful, false if not.
261
+ # @see http://developer.github.com/v3/activity/starring/#check-if-you-are-starring-a-repository
262
+ # @example
263
+ # client.starring?('caseyscarborough','github')
264
+ def starring?(owner, repo)
265
+ boolean_get "/user/starred/#{owner}/#{repo}", auth_params
266
+ end
267
+
268
+ # List repositories a user is watching.
269
+ #
270
+ # @param username [String] The target user's usernmae.
271
+ # @return [Array]
272
+ # @see http://developer.github.com/v3/activity/watching/#list-repositories-being-watched
273
+ # @example
274
+ # GitHub.watching('caseyscarborough')
275
+ # @example
276
+ # client.watching
277
+ def watching(username=nil)
278
+ if username
279
+ get "/users/#{username}/subscriptions"
280
+ else
281
+ get "/user/subscriptions", auth_params
282
+ end
283
+ end
284
+
285
+ # List public organizations for a user.
286
+ #
287
+ # @param username [String] The target user's username.
288
+ # @return [Array] List of organizations.
289
+ # @see http://developer.github.com/v3/orgs/#list-user-organizations
290
+ # @example
291
+ # GitHub.organizations('caseyscarborough')
292
+ # @example
293
+ # client.organizations
294
+ def organizations(username=nil)
295
+ if username
296
+ get "/users/#{username}/orgs"
297
+ else
298
+ get "/user/orgs", auth_params
299
+ end
300
+ end
301
+
201
302
  end
202
303
 
203
304
  end
@@ -1,10 +1,12 @@
1
1
  require 'json'
2
- require 'github_api_v3/client/users'
3
- require 'github_api_v3/client/repos'
2
+ require 'github_api_v3/client/events'
3
+ require 'github_api_v3/client/feeds'
4
4
  require 'github_api_v3/client/gists'
5
- require 'github_api_v3/client/markdown'
6
5
  require 'github_api_v3/client/gitignore'
7
- require 'github_api_v3/client/events'
6
+ require 'github_api_v3/client/markdown'
7
+ require 'github_api_v3/client/orgs'
8
+ require 'github_api_v3/client/repos'
9
+ require 'github_api_v3/client/users'
8
10
 
9
11
  module GitHub
10
12
 
@@ -18,12 +20,14 @@ module GitHub
18
20
  # Default base uri for the API functionality.
19
21
  base_uri Default::API_ENDPOINT
20
22
 
21
- include GitHub::Client::Users
22
- include GitHub::Client::Repos
23
+ include GitHub::Client::Events
24
+ include GitHub::Client::Feeds
25
+ include GitHub::Client::Gitignore
23
26
  include GitHub::Client::Gists
24
27
  include GitHub::Client::Markdown
25
- include GitHub::Client::Gitignore
26
- include GitHub::Client::Events
28
+ include GitHub::Client::Orgs
29
+ include GitHub::Client::Repos
30
+ include GitHub::Client::Users
27
31
 
28
32
  attr_reader :login, :access_token
29
33
 
@@ -57,8 +61,8 @@ module GitHub
57
61
  # Perform a put request.
58
62
  #
59
63
  # @return [Hash, Array, String]
60
- def put(url, params={})
61
- response = self.class.put url, query: params
64
+ def put(url, params={}, body={})
65
+ response = self.class.put url, query: params, body: body.to_json
62
66
  handle_response(response)
63
67
  response.parsed_response
64
68
  end
@@ -66,8 +70,8 @@ module GitHub
66
70
  # Perform a put request with boolean return type.
67
71
  #
68
72
  # @return [Boolean]
69
- def boolean_put(url, params={})
70
- response = self.class.put url, query: params
73
+ def boolean_put(url, params={}, body={})
74
+ response = self.class.put url, query: params, body: body.to_json
71
75
  response.code == 204
72
76
  rescue GitHub::NotFound
73
77
  false
@@ -5,7 +5,10 @@ module GitHub
5
5
 
6
6
  # The default API endpoint for GitHub's API.
7
7
  API_ENDPOINT = "https://api.github.com".freeze
8
-
8
+
9
+ # The default web endpoint for GitHub.
10
+ WEB_ENDPOINT = "https://github.com".freeze
11
+
9
12
  end
10
13
  end
11
14
 
@@ -1,3 +1,3 @@
1
1
  module GitHub
2
- VERSION = '0.2.2'
2
+ VERSION = '0.3.0'
3
3
  end
@@ -0,0 +1 @@
1
+ {"http_interactions":[{"request":{"method":"get","uri":"https://api.github.com/feeds?access_token=<TEST_ACCESS_TOKEN>&login=<TEST_LOGIN>","body":{"encoding":"US-ASCII","base64_string":""},"headers":{}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["GitHub.com"],"Date":["Sun, 18 Aug 2013 20:50:47 GMT"],"Content-Type":["application/json; charset=utf-8"],"Status":["200 OK"],"X-Ratelimit-Limit":["5000"],"X-Ratelimit-Remaining":["4996"],"X-Ratelimit-Reset":["1376860217"],"X-Oauth-Scopes":["delete_repo, user, public_repo, repo, gist"],"X-Github-Media-Type":["github.beta; format=json"],"X-Content-Type-Options":["nosniff"],"Content-Length":["413"],"Access-Control-Allow-Credentials":["true"],"Access-Control-Expose-Headers":["ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes"],"Access-Control-Allow-Origin":["*"],"Etag":["\"feda7f0bbf27ffa06dceddabbe492ed7\""],"Cache-Control":["max-age=0, private, must-revalidate"],"Vary":["Accept-Encoding"]},"body":{"encoding":"UTF-8","base64_string":"eyJ0aW1lbGluZV91cmwiOiJodHRwczovL2dpdGh1Yi5jb20vdGltZWxpbmUi\nLCJ1c2VyX3VybCI6Imh0dHBzOi8vZ2l0aHViLmNvbS97dXNlcn0iLCJjdXJy\nZW50X3VzZXJfcHVibGljX3VybCI6Imh0dHBzOi8vZ2l0aHViLmNvbS88VEVT\nVF9MT0dJTj4iLCJfbGlua3MiOnsidGltZWxpbmUiOnsiaHJlZiI6Imh0dHBz\nOi8vZ2l0aHViLmNvbS90aW1lbGluZSIsInR5cGUiOiJhcHBsaWNhdGlvbi9h\ndG9tK3htbCJ9LCJ1c2VyIjp7ImhyZWYiOiJodHRwczovL2dpdGh1Yi5jb20v\ne3VzZXJ9IiwidHlwZSI6ImFwcGxpY2F0aW9uL2F0b20reG1sIn0sImN1cnJl\nbnRfdXNlcl9wdWJsaWMiOnsiaHJlZiI6Imh0dHBzOi8vZ2l0aHViLmNvbS88\nVEVTVF9MT0dJTj4iLCJ0eXBlIjoiYXBwbGljYXRpb24vYXRvbSt4bWwifX19\n"},"http_version":null},"recorded_at":"Sun, 18 Aug 2013 20:50:24 GMT"}],"recorded_with":"VCR 2.5.0"}
@@ -0,0 +1 @@
1
+ {"http_interactions":[{"request":{"method":"get","uri":"https://api.github.com/orgs/github?","body":{"encoding":"US-ASCII","base64_string":""},"headers":{}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["GitHub.com"],"Date":["Sun, 18 Aug 2013 23:48:02 GMT"],"Content-Type":["application/json; charset=utf-8"],"Status":["200 OK"],"X-Ratelimit-Limit":["60"],"X-Ratelimit-Remaining":["58"],"X-Ratelimit-Reset":["1376872282"],"Cache-Control":["public, max-age=60, s-maxage=60"],"Last-Modified":["Sun, 18 Aug 2013 23:46:09 GMT"],"Etag":["\"82400b5596b5debb337abc1c1f848773\""],"Vary":["Accept","Accept-Encoding"],"X-Github-Media-Type":["github.beta; format=json"],"X-Content-Type-Options":["nosniff"],"Content-Length":["811"],"Access-Control-Allow-Credentials":["true"],"Access-Control-Expose-Headers":["ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes"],"Access-Control-Allow-Origin":["*"]},"body":{"encoding":"UTF-8","base64_string":"eyJsb2dpbiI6ImdpdGh1YiIsImlkIjo5OTE5LCJ1cmwiOiJodHRwczovL2Fw\naS5naXRodWIuY29tL29yZ3MvZ2l0aHViIiwicmVwb3NfdXJsIjoiaHR0cHM6\nLy9hcGkuZ2l0aHViLmNvbS9vcmdzL2dpdGh1Yi9yZXBvcyIsImV2ZW50c191\ncmwiOiJodHRwczovL2FwaS5naXRodWIuY29tL29yZ3MvZ2l0aHViL2V2ZW50\ncyIsIm1lbWJlcnNfdXJsIjoiaHR0cHM6Ly9hcGkuZ2l0aHViLmNvbS9vcmdz\nL2dpdGh1Yi9tZW1iZXJzey9tZW1iZXJ9IiwicHVibGljX21lbWJlcnNfdXJs\nIjoiaHR0cHM6Ly9hcGkuZ2l0aHViLmNvbS9vcmdzL2dpdGh1Yi9wdWJsaWNf\nbWVtYmVyc3svbWVtYmVyfSIsImF2YXRhcl91cmwiOiJodHRwczovLzEuZ3Jh\ndmF0YXIuY29tL2F2YXRhci82MTAyNDg5NmYyOTEzMDM2MTViY2Q0ZjdhMGRj\nZmI3ND9kPWh0dHBzJTNBJTJGJTJGaWRlbnRpY29ucy5naXRodWIuY29tJTJG\nYWU4MTZhODBlNGMxYzU2Y2FhMmViNGUxODE5Y2JiMmYucG5nIiwibmFtZSI6\nIkdpdEh1YiIsImNvbXBhbnkiOm51bGwsImJsb2ciOiJodHRwczovL2dpdGh1\nYi5jb20vYWJvdXQiLCJsb2NhdGlvbiI6IlNhbiBGcmFuY2lzY28sIENBIiwi\nZW1haWwiOiJzdXBwb3J0QGdpdGh1Yi5jb20iLCJwdWJsaWNfcmVwb3MiOjEw\nNywicHVibGljX2dpc3RzIjowLCJmb2xsb3dlcnMiOjEyLCJmb2xsb3dpbmci\nOjAsImh0bWxfdXJsIjoiaHR0cHM6Ly9naXRodWIuY29tL2dpdGh1YiIsImNy\nZWF0ZWRfYXQiOiIyMDA4LTA1LTExVDA0OjM3OjMxWiIsInVwZGF0ZWRfYXQi\nOiIyMDEzLTA4LTE4VDIzOjQ2OjA5WiIsInR5cGUiOiJPcmdhbml6YXRpb24i\nfQ==\n"},"http_version":null},"recorded_at":"Sun, 18 Aug 2013 23:47:40 GMT"}],"recorded_with":"VCR 2.5.0"}
@@ -0,0 +1 @@
1
+ {"http_interactions":[{"request":{"method":"put","uri":"https://api.github.com/user/starred/<TEST_LOGIN>/github?access_token=<TEST_ACCESS_TOKEN>&login=<TEST_LOGIN>","body":{"encoding":"UTF-8","base64_string":""},"headers":{}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["GitHub.com"],"Date":["Sun, 18 Aug 2013 21:35:03 GMT"],"Status":["204 No Content"],"X-Ratelimit-Limit":["5000"],"X-Ratelimit-Remaining":["4990"],"X-Ratelimit-Reset":["1376864563"],"X-Oauth-Scopes":["delete_repo, user, public_repo, repo, gist"],"X-Accepted-Oauth-Scopes":["repo, public_repo, repo:status, delete_repo, site_admin"],"X-Github-Media-Type":["github.beta; format=json"],"X-Content-Type-Options":["nosniff"],"Access-Control-Allow-Credentials":["true"],"Access-Control-Expose-Headers":["ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes"],"Access-Control-Allow-Origin":["*"],"Vary":["Accept-Encoding"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Sun, 18 Aug 2013 21:34:40 GMT"}],"recorded_with":"VCR 2.5.0"}
@@ -0,0 +1 @@
1
+ {"http_interactions":[{"request":{"method":"get","uri":"https://api.github.com/repos/<TEST_LOGIN>/github/stargazers?","body":{"encoding":"US-ASCII","base64_string":""},"headers":{}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["GitHub.com"],"Date":["Sun, 18 Aug 2013 21:35:02 GMT"],"Content-Type":["application/json; charset=utf-8"],"Status":["200 OK"],"X-Ratelimit-Limit":["60"],"X-Ratelimit-Remaining":["41"],"X-Ratelimit-Reset":["1376863596"],"Cache-Control":["public, max-age=60, s-maxage=60"],"Last-Modified":["Sun, 18 Aug 2013 21:03:29 GMT"],"Etag":["\"44a263ba846fba41401f3c0c71a36c85\""],"Vary":["Accept","Accept-Encoding"],"X-Github-Media-Type":["github.beta; format=json"],"X-Content-Type-Options":["nosniff"],"Content-Length":["2093"],"Access-Control-Allow-Credentials":["true"],"Access-Control-Expose-Headers":["ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes"],"Access-Control-Allow-Origin":["*"]},"body":{"encoding":"UTF-8","base64_string":"W3sibG9naW4iOiJjaHJpc2Rvbm92YW4iLCJpZCI6MzIzOTU4NywiYXZhdGFy\nX3VybCI6Imh0dHBzOi8vMi5ncmF2YXRhci5jb20vYXZhdGFyLzJlMGYzZTRl\nNTQxNGNjZWU3ZWFhNDhiMjMwNDI0ZTVkP2Q9aHR0cHMlM0ElMkYlMkZpZGVu\ndGljb25zLmdpdGh1Yi5jb20lMkYzMzc2MWVlYjJmYzZhYzdlNWU0YzFhM2E4\nYmUyZGNiNC5wbmciLCJncmF2YXRhcl9pZCI6IjJlMGYzZTRlNTQxNGNjZWU3\nZWFhNDhiMjMwNDI0ZTVkIiwidXJsIjoiaHR0cHM6Ly9hcGkuZ2l0aHViLmNv\nb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yIsInJlcG9zX3VybCI6Imh0dHBzOi8vYXBpLmdpdGh1Yi5j\nb20vdXNlcnMvPFRFU1RfTE9HSU4+L3JlcG9zIiwiZXZlbnRzX3VybCI6Imh0\ndHBzOi8vYXBpLmdpdGh1Yi5jb20vdXNlcnMvPFRFU1RfTE9HSU4+L2V2ZW50\nc3svcHJpdmFjeX0iLCJyZWNlaXZlZF9ldmVudHNfdXJsIjoiaHR0cHM6Ly9h\ncGkuZ2l0aHViLmNvbS91c2Vycy88VEVTVF9MT0dJTj4vcmVjZWl2ZWRfZXZl\nbnRzIiwidHlwZSI6IlVzZXIifV0=\n"},"http_version":null},"recorded_at":"Sun, 18 Aug 2013 21:34:40 GMT"}],"recorded_with":"VCR 2.5.0"}
@@ -0,0 +1 @@
1
+ {"http_interactions":[{"request":{"method":"put","uri":"https://api.github.com/repos/<TEST_LOGIN>/github/subscription?access_token=<TEST_ACCESS_TOKEN>&login=<TEST_LOGIN>","body":{"encoding":"UTF-8","base64_string":"eyJzdWJzY3JpYmVkIjp0cnVlLCJpZ25vcmVkIjpmYWxzZX0=\n"},"headers":{}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["GitHub.com"],"Date":["Sun, 18 Aug 2013 21:58:50 GMT"],"Content-Type":["application/json; charset=utf-8"],"Status":["200 OK"],"X-Ratelimit-Limit":["5000"],"X-Ratelimit-Remaining":["4983"],"X-Ratelimit-Reset":["1376864563"],"X-Oauth-Scopes":["delete_repo, user, public_repo, repo, gist"],"X-Accepted-Oauth-Scopes":["notifications, repo"],"X-Github-Media-Type":["github.beta; format=json"],"X-Content-Type-Options":["nosniff"],"Content-Length":["231"],"Access-Control-Allow-Credentials":["true"],"Access-Control-Expose-Headers":["ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes"],"Access-Control-Allow-Origin":["*"],"Etag":["\"5bf00eac0262e69e0ea349ace0a38374\""],"Cache-Control":["max-age=0, private, must-revalidate"],"Vary":["Accept-Encoding"]},"body":{"encoding":"UTF-8","base64_string":"eyJzdWJzY3JpYmVkIjp0cnVlLCJpZ25vcmVkIjpmYWxzZSwicmVhc29uIjpu\ndWxsLCJjcmVhdGVkX2F0IjoiMjAxMy0wOC0xOFQyMTo1ODo1MFoiLCJ1cmwi\nOiJodHRwczovL2FwaS5naXRodWIuY29tL3JlcG9zLzxURVNUX0xPR0lOPi9n\naXRodWIvc3Vic2NyaXB0aW9uIiwicmVwb3NpdG9yeV91cmwiOiJodHRwczov\nL2FwaS5naXRodWIuY29tL3JlcG9zLzxURVNUX0xPR0lOPi9naXRodWIifQ==\n"},"http_version":null},"recorded_at":"Sun, 18 Aug 2013 21:58:27 GMT"}],"recorded_with":"VCR 2.5.0"}
@@ -0,0 +1 @@
1
+ {"http_interactions":[{"request":{"method":"put","uri":"https://api.github.com/repos/<TEST_LOGIN>/github/subscription?access_token=<TEST_ACCESS_TOKEN>&login=<TEST_LOGIN>","body":{"encoding":"UTF-8","base64_string":"eyJzdWJzY3JpYmVkIjp0cnVlLCJpZ25vcmVkIjpmYWxzZX0=\n"},"headers":{}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["GitHub.com"],"Date":["Sun, 18 Aug 2013 22:00:47 GMT"],"Content-Type":["application/json; charset=utf-8"],"Status":["200 OK"],"X-Ratelimit-Limit":["5000"],"X-Ratelimit-Remaining":["4977"],"X-Ratelimit-Reset":["1376864563"],"X-Oauth-Scopes":["delete_repo, user, public_repo, repo, gist"],"X-Accepted-Oauth-Scopes":["notifications, repo"],"X-Github-Media-Type":["github.beta; format=json"],"X-Content-Type-Options":["nosniff"],"Content-Length":["231"],"Access-Control-Allow-Credentials":["true"],"Access-Control-Expose-Headers":["ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes"],"Access-Control-Allow-Origin":["*"],"Etag":["\"0c804d5f235a65e4cb467a0cb34e22e8\""],"Cache-Control":["max-age=0, private, must-revalidate"],"Vary":["Accept-Encoding"]},"body":{"encoding":"UTF-8","base64_string":"eyJzdWJzY3JpYmVkIjp0cnVlLCJpZ25vcmVkIjpmYWxzZSwicmVhc29uIjpu\ndWxsLCJjcmVhdGVkX2F0IjoiMjAxMy0wOC0xOFQyMjowMDo0N1oiLCJ1cmwi\nOiJodHRwczovL2FwaS5naXRodWIuY29tL3JlcG9zLzxURVNUX0xPR0lOPi9n\naXRodWIvc3Vic2NyaXB0aW9uIiwicmVwb3NpdG9yeV91cmwiOiJodHRwczov\nL2FwaS5naXRodWIuY29tL3JlcG9zLzxURVNUX0xPR0lOPi9naXRodWIifQ==\n"},"http_version":null},"recorded_at":"Sun, 18 Aug 2013 22:00:24 GMT"},{"request":{"method":"get","uri":"https://api.github.com/repos/<TEST_LOGIN>/github/subscription?access_token=<TEST_ACCESS_TOKEN>&login=<TEST_LOGIN>","body":{"encoding":"US-ASCII","base64_string":""},"headers":{}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["GitHub.com"],"Date":["Sun, 18 Aug 2013 22:00:47 GMT"],"Content-Type":["application/json; charset=utf-8"],"Status":["200 OK"],"X-Ratelimit-Limit":["5000"],"X-Ratelimit-Remaining":["4976"],"X-Ratelimit-Reset":["1376864563"],"X-Oauth-Scopes":["delete_repo, user, public_repo, repo, gist"],"X-Accepted-Oauth-Scopes":["notifications, repo"],"X-Github-Media-Type":["github.beta; format=json"],"X-Content-Type-Options":["nosniff"],"Content-Length":["231"],"Access-Control-Allow-Credentials":["true"],"Access-Control-Expose-Headers":["ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes"],"Access-Control-Allow-Origin":["*"],"Etag":["\"0c804d5f235a65e4cb467a0cb34e22e8\""],"Cache-Control":["max-age=0, private, must-revalidate"],"Vary":["Accept-Encoding"]},"body":{"encoding":"UTF-8","base64_string":"eyJzdWJzY3JpYmVkIjp0cnVlLCJpZ25vcmVkIjpmYWxzZSwicmVhc29uIjpu\ndWxsLCJjcmVhdGVkX2F0IjoiMjAxMy0wOC0xOFQyMjowMDo0N1oiLCJ1cmwi\nOiJodHRwczovL2FwaS5naXRodWIuY29tL3JlcG9zLzxURVNUX0xPR0lOPi9n\naXRodWIvc3Vic2NyaXB0aW9uIiwicmVwb3NpdG9yeV91cmwiOiJodHRwczov\nL2FwaS5naXRodWIuY29tL3JlcG9zLzxURVNUX0xPR0lOPi9naXRodWIifQ==\n"},"http_version":null},"recorded_at":"Sun, 18 Aug 2013 22:00:24 GMT"}],"recorded_with":"VCR 2.5.0"}
@@ -0,0 +1 @@
1
+ {"http_interactions":[{"request":{"method":"delete","uri":"https://api.github.com/user/starred/<TEST_LOGIN>/github?access_token=<TEST_ACCESS_TOKEN>&login=<TEST_LOGIN>","body":{"encoding":"US-ASCII","base64_string":""},"headers":{}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["GitHub.com"],"Date":["Sun, 18 Aug 2013 21:35:03 GMT"],"Status":["204 No Content"],"X-Ratelimit-Limit":["5000"],"X-Ratelimit-Remaining":["4991"],"X-Ratelimit-Reset":["1376864563"],"X-Oauth-Scopes":["delete_repo, user, public_repo, repo, gist"],"X-Accepted-Oauth-Scopes":["repo, public_repo, repo:status, delete_repo, site_admin"],"X-Github-Media-Type":["github.beta; format=json"],"X-Content-Type-Options":["nosniff"],"Access-Control-Allow-Credentials":["true"],"Access-Control-Expose-Headers":["ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes"],"Access-Control-Allow-Origin":["*"],"Vary":["Accept-Encoding"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Sun, 18 Aug 2013 21:34:40 GMT"}],"recorded_with":"VCR 2.5.0"}
@@ -0,0 +1 @@
1
+ {"http_interactions":[{"request":{"method":"delete","uri":"https://api.github.com/repos/<TEST_LOGIN>/github/subscription?access_token=<TEST_ACCESS_TOKEN>&login=<TEST_LOGIN>","body":{"encoding":"US-ASCII","base64_string":""},"headers":{}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["GitHub.com"],"Date":["Sun, 18 Aug 2013 21:58:50 GMT"],"Status":["204 No Content"],"X-Ratelimit-Limit":["5000"],"X-Ratelimit-Remaining":["4982"],"X-Ratelimit-Reset":["1376864563"],"X-Content-Type-Options":["nosniff"],"Access-Control-Allow-Credentials":["true"],"Access-Control-Expose-Headers":["ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes"],"Access-Control-Allow-Origin":["*"],"Vary":["Accept-Encoding"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Sun, 18 Aug 2013 21:58:27 GMT"}],"recorded_with":"VCR 2.5.0"}
@@ -0,0 +1 @@
1
+ {"http_interactions":[{"request":{"method":"get","uri":"https://api.github.com/repos/<TEST_LOGIN>/github/subscribers?","body":{"encoding":"US-ASCII","base64_string":""},"headers":{}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["GitHub.com"],"Date":["Sun, 18 Aug 2013 21:58:49 GMT"],"Content-Type":["application/json; charset=utf-8"],"Status":["200 OK"],"X-Ratelimit-Limit":["60"],"X-Ratelimit-Remaining":["37"],"X-Ratelimit-Reset":["1376863596"],"Cache-Control":["public, max-age=60, s-maxage=60"],"Last-Modified":["Fri, 16 Aug 2013 01:03:45 GMT"],"Etag":["\"8db1b26302d7197dd858beb9547e0b9e\""],"Vary":["Accept","Accept-Encoding"],"X-Github-Media-Type":["github.beta; format=json"],"X-Content-Type-Options":["nosniff"],"Content-Length":["1023"],"Access-Control-Allow-Credentials":["true"],"Access-Control-Expose-Headers":["ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes"],"Access-Control-Allow-Origin":["*"]},"body":{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Gh1Yi5jb20v\ndXNlcnMvY2hyaXNkb25vdmFuL29yZ3MiLCJyZXBvc191cmwiOiJodHRwczov\nL2FwaS5naXRodWIuY29tL3VzZXJzL2NocmlzZG9ub3Zhbi9yZXBvcyIsImV2\nZW50c191cmwiOiJodHRwczovL2FwaS5naXRodWIuY29tL3VzZXJzL2Nocmlz\nZG9ub3Zhbi9ldmVudHN7L3ByaXZhY3l9IiwicmVjZWl2ZWRfZXZlbnRzX3Vy\nbCI6Imh0dHBzOi8vYXBpLmdpdGh1Yi5jb20vdXNlcnMvY2hyaXNkb25vdmFu\nL3JlY2VpdmVkX2V2ZW50cyIsInR5cGUiOiJVc2VyIn1d\n"},"http_version":null},"recorded_at":"Sun, 18 Aug 2013 21:58:27 GMT"}],"recorded_with":"VCR 2.5.0"}
@@ -0,0 +1 @@
1
+ {"http_interactions":[{"request":{"method":"get","uri":"https://api.github.com/notifications?access_token=<TEST_ACCESS_TOKEN>&login=<TEST_LOGIN>","body":{"encoding":"US-ASCII","base64_string":""},"headers":{}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["GitHub.com"],"Date":["Sun, 18 Aug 2013 22:15:28 GMT"],"Content-Type":["application/json; charset=utf-8"],"Status":["200 OK"],"X-Ratelimit-Limit":["5000"],"X-Ratelimit-Remaining":["4974"],"X-Ratelimit-Reset":["1376864563"],"X-Poll-Interval":["60"],"X-Oauth-Scopes":["delete_repo, user, public_repo, repo, gist"],"X-Accepted-Oauth-Scopes":["notifications, repo"],"X-Github-Media-Type":["github.beta; format=json"],"X-Content-Type-Options":["nosniff"],"Content-Length":["2"],"Access-Control-Allow-Credentials":["true"],"Access-Control-Expose-Headers":["ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes"],"Access-Control-Allow-Origin":["*"],"Etag":["\"d751713988987e9331980363e24189ce\""],"Cache-Control":["max-age=0, private, must-revalidate"],"Vary":["Accept-Encoding"]},"body":{"encoding":"UTF-8","base64_string":"W10=\n"},"http_version":null},"recorded_at":"Sun, 18 Aug 2013 22:15:05 GMT"}],"recorded_with":"VCR 2.5.0"}
@@ -0,0 +1 @@
1
+ {"http_interactions":[{"request":{"method":"get","uri":"https://api.github.com/user/orgs?access_token=<TEST_ACCESS_TOKEN>&login=<TEST_LOGIN>","body":{"encoding":"US-ASCII","base64_string":""},"headers":{}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["GitHub.com"],"Date":["Sun, 18 Aug 2013 23:31:22 GMT"],"Content-Type":["application/json; charset=utf-8"],"Status":["200 OK"],"X-Ratelimit-Limit":["5000"],"X-Ratelimit-Remaining":["4999"],"X-Ratelimit-Reset":["1376872282"],"X-Oauth-Scopes":["delete_repo, user, public_repo, repo, gist"],"X-Accepted-Oauth-Scopes":["repo, user"],"X-Github-Media-Type":["github.beta; format=json"],"X-Content-Type-Options":["nosniff"],"Content-Length":["2"],"Access-Control-Allow-Credentials":["true"],"Access-Control-Expose-Headers":["ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes"],"Access-Control-Allow-Origin":["*"],"Etag":["\"d751713988987e9331980363e24189ce\""],"Cache-Control":["max-age=0, private, must-revalidate"],"Vary":["Accept-Encoding"]},"body":{"encoding":"UTF-8","base64_string":"W10=\n"},"http_version":null},"recorded_at":"Sun, 18 Aug 2013 23:31:00 GMT"}],"recorded_with":"VCR 2.5.0"}