Lifelist-api is an API for creating bucketlist of things you which to complete in your lifetime, e.g Books to read, Places to travel and so many other fascinating things. Lifelist-api also gives your the ability to add items to your bucketlists.
To run this application locally, you will need to either clone this repository or fork it. You can also download the entire repository as a zip package and run locally.
Lifelist-api is an API service that allows users create bucketlists to store items. Bucketlists are initialized with a name. Items are stored under bucketlists, with a name and a done-status indicating whether item has been completed or not.
For full access to the API, a user account is required. After registration, an initial request is made to log in to user account. This request generates a JSON Web Token, which is returned in the response. This token is used to authenticate subsequent requests to the API.
This application runs on Rails which is a Ruby powered framework built to make developing web applications faster. If you intend to run this application locally, you must make sure you have the following installed:
That should get you all set up for running locally. If you run into any issues installing any of the above, your safest bet is to google it as there is already a solution on-line.
Once you have a copy of this project and it's dependencies installed, you are good to go. run bundle install
to install all the required external dependencies.
Run the following command from the terminal:
rake db:create db:migrate
Create the database for the test environment as well:
rake db:create db:migrate RAILS_ENV=test
Run the following command from the terminal to get all tests running
rspec spec
The following endpoints are available
EndPoint | Functionality |
---|---|
POST /auth/login | Logs a user in |
GET /auth/logout | Logs a user out |
POST /bucketlists/ | Create a new bucket list |
GET /bucketlists/ | List all the created bucket lists |
GET /bucketlists/:id | Get single bucket list |
PUT /bucketlists/:id | Update this bucketlist |
DELETE /bucketlists/:id | Delete this single bucketlist |
POST /bucketlists/:id/items/ | Create a new item in bucketlist |
PUT /bucketlists/:id/items/:item_id | Update a bucketlist item |
DELETE /bucketlists/:id/items/:item_id | Delete an item in a bucket lists |
Changes and upgrades are made from time to time in this API. The API is versioned to avoid code breaking. New changes are implemented under a new version.
The API only responds with json, and does not yet have support for xml and other response types.
OAuth not yet implemented.
The full documentation for the API and all available endpoints is explained here
- Fork it: Fork a-bucketlist on Github
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
note: I might not respond to pull requests immediately as I am usually quite busy.