Class: LunaApi::Todo
- Inherits:
-
Object
- Object
- LunaApi::Todo
- Defined in:
- lib/luna_api/todo.rb
Class Method Summary collapse
- .complete(id) ⇒ Object
- .create(attrs) ⇒ Object
- .get ⇒ Object
- .tags ⇒ Object
- .update(id, attrs) ⇒ Object
Class Method Details
.complete(id) ⇒ Object
14 15 16 17 |
# File 'lib/luna_api/todo.rb', line 14 def self.complete(id) response = LunaApi::Request.put("http://todo.lunasandals.com/todo/#{id}/complete") handle_response(response) end |
.create(attrs) ⇒ Object
9 10 11 12 |
# File 'lib/luna_api/todo.rb', line 9 def self.create(attrs) response = LunaApi::Request.post("http://todo.lunasandals.com/todo", :params => {:todo => attrs}) handle_response(response) end |
.get ⇒ Object
4 5 6 7 |
# File 'lib/luna_api/todo.rb', line 4 def self.get response = LunaApi::Request.get("http://todo.lunasandals.com/") response.body end |