Class: TentClient::App
- Inherits:
-
Object
- Object
- TentClient::App
- Defined in:
- lib/tent-client/app.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Instance Method Summary collapse
- #authorization ⇒ Object
- #create(data) ⇒ Object
- #delete(id) ⇒ Object
- #get(id) ⇒ Object
-
#initialize(client) ⇒ App
constructor
A new instance of App.
- #list(params = {}) ⇒ Object
- #update(id, data) ⇒ Object
Constructor Details
#initialize(client) ⇒ App
Returns a new instance of App.
5 6 7 |
# File 'lib/tent-client/app.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.rb', line 3 def client @client end |
Instance Method Details
#authorization ⇒ Object
29 30 31 |
# File 'lib/tent-client/app.rb', line 29 def AppAuthorization.new(@client) end |
#create(data) ⇒ Object
9 10 11 |
# File 'lib/tent-client/app.rb', line 9 def create(data) @client.http.post("apps", data) end |
#delete(id) ⇒ Object
21 22 23 |
# File 'lib/tent-client/app.rb', line 21 def delete(id) @client.http.delete("apps/#{id}") end |
#get(id) ⇒ Object
13 14 15 |
# File 'lib/tent-client/app.rb', line 13 def get(id) @client.http.get("apps/#{id}") end |
#list(params = {}) ⇒ Object
17 18 19 |
# File 'lib/tent-client/app.rb', line 17 def list(params = {}) @client.http.get("apps", params) end |
#update(id, data) ⇒ Object
25 26 27 |
# File 'lib/tent-client/app.rb', line 25 def update(id, data) @client.http.put("apps/#{id}", data) end |