Module: GitHub::Client::OAuth
- Included in:
- GitHub::Client
- Defined in:
- lib/github_api_v3/client/oauth.rb
Overview
Methods for the Authorizations API.
These methods require the user to use basic authentication.
Instance Method Summary collapse
-
#authorization(id) ⇒ Hash
Get a single authorization.
-
#authorizations ⇒ Array
List your authorizations.
-
#create_authorization(options = {}) ⇒ Hash
Create a new authorization.
-
#delete_authorization(id) ⇒ Boolean
Delete an authorization.
-
#update_authorization(id, options = {}) ⇒ Hash
Update an existing authorization.
Instance Method Details
#authorization(id) ⇒ Hash
Get a single authorization.
Requires basic authentication.
34 35 36 |
# File 'lib/github_api_v3/client/oauth.rb', line 34 def (id) get "/authorizations/#{id}" end |
#authorizations ⇒ Array
List your authorizations.
Requires basic authentication.
20 21 22 |
# File 'lib/github_api_v3/client/oauth.rb', line 20 def get "/authorizations" end |
#create_authorization(options = {}) ⇒ Hash
Create a new authorization.
Requires basic authentication.
57 58 59 |
# File 'lib/github_api_v3/client/oauth.rb', line 57 def (={}) post "/authorizations", body: end |
#delete_authorization(id) ⇒ Boolean
Delete an authorization
Requires basic authentication.
91 92 93 |
# File 'lib/github_api_v3/client/oauth.rb', line 91 def (id) boolean_request :delete, "/authorizations/#{id}" end |
#update_authorization(id, options = {}) ⇒ Hash
Update an existing authorization.
Requires basic authentication.
77 78 79 |
# File 'lib/github_api_v3/client/oauth.rb', line 77 def (id, ={}) patch "/authorizations/#{id}", body: end |