Class: TentClient::AppAuthorization
- Inherits:
-
Object
- Object
- TentClient::AppAuthorization
- Defined in:
- lib/tent-client/app_authorization.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Instance Method Summary collapse
- #create(app_id, data) ⇒ Object
- #delete(app_id, id) ⇒ Object
-
#initialize(client) ⇒ AppAuthorization
constructor
A new instance of AppAuthorization.
- #update(app_id, id, data) ⇒ Object
Constructor Details
#initialize(client) ⇒ AppAuthorization
Returns a new instance of AppAuthorization.
5 6 7 |
# File 'lib/tent-client/app_authorization.rb', line 5 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
3 4 5 |
# File 'lib/tent-client/app_authorization.rb', line 3 def client @client end |
Instance Method Details
#create(app_id, data) ⇒ Object
9 10 11 |
# File 'lib/tent-client/app_authorization.rb', line 9 def create(app_id, data) @client.http.post("apps/#{app_id}/authorizations", data) end |
#delete(app_id, id) ⇒ Object
17 18 19 |
# File 'lib/tent-client/app_authorization.rb', line 17 def delete(app_id, id) @client.http.delete("apps/#{app_id}/authorizations/#{id}") end |
#update(app_id, id, data) ⇒ Object
13 14 15 |
# File 'lib/tent-client/app_authorization.rb', line 13 def update(app_id, id, data) @client.http.put("apps/#{app_id}/authorizations/#{id}", data) end |