Coder Social home page Coder Social logo

bucketlist's Introduction

Bucketlist API(Checkpoint 2)

Build Status | Coverage Status

BucketList API is a simple application built using the flask microframework. It's an application that helps users track what they want to do in the future. It is an API that can be consumed by other applications.

Functionalities

User Registration/Login.
User create a bucketlist.
User can delete/ edit an existing bucketlist.
User can add items to an existing bucketlist.
User can delete/ edit items of a bucketlist

Installation

  1. Create a folder.

  2. Clone the repository into the given folder.
    https://github.com/andela-amutava/Bucketlist.git

  3. Navigate to the project folder.
    Bucketlist

  4. Install project dependencies in your virtual environment.
    pip install -r requirements.txt

5.Set up project development. Run db migrations.
python manage.py db init python manage.py db migrate python manage.py db upgrade 6. Run the server.
python manage.py runserver

Interaction with API

  1. Intergrate your google chrome browser with post-man plugin.
  2. Run your api url on postman.
  3. Choose the appropriate method.
  • POST - For creating a resource.
  • GET - To obtain resources from the server.
  • PUT - Editing an existing resource.
  • DELETE - Deleting an existing resource.
  1. Pass the required data for the particular methods for appropriate responses.

Security

To achieve secure endpoints on login a user is issued with a token that expires in 10minutes. This token is used during reaching the bucketlist and bucketlists' items endpoints. This is an authorization security mechanism.

API Endpoints

URL Endpoint HTTP Methods Summary
/auth/register POST Register a new user
/auth/login POST Login and retrieve token
/api/bucketlists POST Create a new Bucketlist
/api/bucketlists GET Retrieve all bucketlists for user
/api/bucketlists/?limit=2&page=1 GET Retrieve one bucketlist per page
/api/bucketlists/<id> GET Retrieve bucketlist details
/api/bucketlists/<id> PUT Update bucket list details
/api/bucketlists/<id> DELETE Delete a bucket list
/api/bucketlistitems/<id>/items POST Create items in a bucket list
/api/bucketlistitems/<id>/items/<item_id> DELETE Delete a item in a bucket list
/api/bucketlistitems/<id>/items/<item_id> PUT update a bucket list item details

Testing

You can run the tests nosetests --with-coverage

Screen shot

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.