Skip to content

megwali/do

Repository files navigation

Do!

Coverage Status Build Status

Description

Do! is an API (Application Programming Interface) Bucketlist Service that empowers you to keep track of those important things you need to get done in your lifetime. Whether you want to see Paris, climb Everest, learn the piano, start a charity or write a will, Do! helps you keep track and live your dreams while you are alive.

You can manage your bucketlists through any app or device combination which you authorize. Do! integration is seamless with any app, giving you a highly customisable and perhaps familiar experience. Before you kick the bucket, Do!

Instructions For Getting Started

The API documentation can be accessed by clicking: Do! Bucketlist. It explains clearly the rules of engagement with the API in an easily consumable manner. Basic information about the API is given below.

Functions and Features

  • Create a Do! account
  • Create and manage bucketlists
  • Create items in your bucketlists
  • Track items that have or have not been done/accomplished
  • Search for bucketlist or bucketlist items by name
  • Paginate and limit search queries at will
  • No unauthorized access to your bucketlist
  • Integrates seamlessly with any app
  • Simultaneous access to your account from all your authorized apps / devices
  • Terminate all active access to your bucketlist with one request

Dependencies and Frameworks

The application is designed with Ruby 2.3.1, runs on Rails 4.2.7.1 and uses the Puma server. For a list of all "Ruby Gem" dependencies, take a look at the App's Gemfile.

Do! API Endpoints

Below is the list of available endpoints in the BucketList API. Some end points are not available publicly and hence, can only be accessed when you sign up and log in.

End Point Functionality Public Access
POST /users Creates a new user TRUE
POST /auth/login Logs a user in TRUE
GET /auth/logout Logs a user out off all active authorized apps FALSE
POST /api/v1/bucketlists Create a new bucketlist FALSE
GET /api/v1/bucketlists List all the created bucketlists FALSE
GET /bucketlists/:id Get a single bucketlist FALSE
PUT /bucketlists/:id Update the selected bucketlist FALSE
DELETE /bucketlists/:id Delete the selected bucketlist FALSE
POST /bucketlists/:id/items Creates a new item in the selected bucketlist FALSE
GET /bucketlists/:id/items Lists all items in the selected bucketlist. FALSE
GET /bucketlists/:id/items/:item_id Fetches a single bucketlist Item FALSE
PUT /bucketlists/:id/items/:item_id Updates a selected bucketlist item FALSE
DELETE /bucketlists/:id/items/:item_id Deletes an item in a bucketlist FALSE

JSON Data Model

The Json data model presentation format for Do! is given below:

  {
    id: 1,
    name: “Travel BucketList”,
    items: [
             {
                id: 1,
                name: “I need to see Paris”,
                date_created: “2015-08-12 11:57:23”,
                date_modified: “2015-08-12 11:57:23”,
                done: False
             }
    ]
    date_created: “2015-08-12 11:57:23”,
    date_modified: “2015-08-12 11:57:23”
    created_by: “Donna”
  }

Pagination And Search

Do! API paginates with 20 results per request by default. However, you can easily specify the number of results per request, as well as the page offset desired. This can be done by supplying the page and limit query params in the API request.

A maximum of 100 results per request is permitted.

Example Request:

GET https://do-bucketlist.herokuapp.com/api/v1/bucketlists?page=2&limit=10

Response:

10 bucketlist records belonging to the logged in user starting from the 11th gets returned.

Searching by Name

Users can search for any owned bucketlist by name using the search query parameter q.

Example Request:

GET https://do-bucketlist.herokuapp.com/api/v1/bucketlists?q=travel

Response:

This returns a list of all bucketlists with names containing "travel".

Run Locally

You will require a basic understanding of "Git" and the "Command Line Interface" to use this application.

You also need access to a steady internet connection for the initial installation.

Installation

Clone the repo to a directory on your local machine using git clone command as shown below:

$  git clone https://github.com/andela-megwali/do.git

Get into the do directory:

$  cd do

Install dependencies

$  bundle install

Setup / Migrate database

$ rake db:setup

Seed database with data (optional)

$ rake db:seed

Start the puma server

$ rails server

Visit http://localhost:3000 to view the application on your browser.

Running the Tests

To test the application, run 'bundle exec rspec' from the do directory after you have installed all the dependencies i.e. using 'bundle install' as previously described.

$  bundle exec rspec

Versions

Do! API currently has only one version follow us on Github to stay up to date with new version releases.

Limitations

  • It currently doesn't support admin features and scoping of authorized app permissions

Contributing

You can contribute to this project by forking the repository on GitHub at https://github.com/andela-megwali/do. We also welcome bug reports and all bugs would be squashed as soon as possible.

Don't leave without fulfilling your dreams. Live it, Do!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published