Todoable is a Ruby gem wrapper for the Todoable HTTP API. Directory structure yoinked from RubyGems.
Ruby version 2.1+
- clone or download repo
- compile gem locally:
gem build todoable.gemspec
3. install:
gem install ./todoable-0.1.0.gem
require "todoable"
wrapper for GET /lists
- parameters: none
- returns: all lists as JSON object
Todoable::List.index
wrapper for POST /lists
- parameters:
:list
(JSON)
- returns:
201
upon success or JSON error message for data problems
Todoable::List.new(:list)
wrapper for GET /lists/:list_id
- parameters:
:list_id
(string)
- returns:
201
upon success or JSON error message for data problems
Todoable::List.show(:list_id)
wrapper for PATCH /lists/:list_id
- parameters:
:list_id
(string),:list
(JSON)
- returns:
201
upon success or JSON error message for data problems
Todoable::List.update(:list_id, :list)
wrapper for DELETE /lists/:list_id
- parameters:
:list_id
(string),
- returns:
204
upon successful deletion
Todoable::List.delete(:list_id)
wrapper for POST /lists/:list_id/items
- parameters:
:list_id
(string):data
(JSON)
- returns:
201
upon success or 422 for data problems
Todoable::Item.new(:list_id, :data)
wrapper for PUT/lists/:list_id/items/:item_id/finish
- parameters:
:list_id
(string):item_id
(string)
- returns:
200
upon successful completion
Todoable::Item.update(:list_id, :item_id)
wrapper for DELETE /lists/:list_id/items/:item_id
- parameters:
:list_id
(string):item_id
(string)
- returns:
204
upon successful deletion
Todoable::Item.delete(:list_id, :item_id)
rake test
from console