Giter VIP home page Giter VIP logo

todoable_gem's Introduction

Todoable

Todoable is a Ruby Gem API wrapper for the todoable API

Installation

Need ruby on system to operate. Get Ruby. Then:

gem install bundler
bundle install

Usage

require 'todoable'

client = Todoable::Client.new({ 
     username: YOUR_USERNAME,
     password: YOUR_PASSWORD,
})

client.get_lists # gets all lists
client.post_list(new_list) # posts new list
client.get_list(list_id) # gets single list
client.delete_list(list_id) # deletes list
client.patch_list(list_id, {:list => {name: 'new name'}}) #update list name

client.post_item(list_id, {:item => {:name => "Feed the cat" }}) # add item to list
client.delete_item(list_id, item_id) # deletes list item
client.finish_item(list_id, item_id) # changes item status to finish

Testing

  1. Requires .env file with VALID_USERNAME & VALID_PASSWORD keys
  2. Uses VCR, have to manually clear out cassettes if changes are made.
  3. Run tests using bundle exec rspec spec in terminal from gem root.

Todo

  1. Inspired by API wrappers I used in rails. Did not get to test configuration at class level but the intention was to be able to configure in initialize. Need to test configuration in framework.
  2. Error handling is not complete. Ex. User gets a positive response if they update a list using a name that is already in use. The name would not actually be updated but user would think it was.
  3. Token expiration was not tested. Token expires every 20min. Added a checker for this. This should be tested and perhaps implemented differently.
  4. Better configure VCR, implement housecleaning in RSPEC config to clean up cassettes.

License

MIT

todoable_gem's People

Contributors

nick-t-go avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.