Giter Club home page Giter Club logo

task-manager-api's Introduction

Task Manager App

This is a backend application of Task Manager app developed using NodeJS and MongoDB. It is currently hosted at https://spriha-task-manager.herokuapp.com.

The following REST API methods are available (can be called using Postman):

  • POST /users: Used to create a new user.
    Body - { "name": "username", "email": "[email protected]", "age": "21", "password": "pswrd123" }

    It doesn't allow existing username/email to create account. It also doesn't allow password field to contain the keyword "password". JWT token is assigned to the new user's session.

  • POST /users/me/avatar: Used to upload avatar picture of the user of type jpg, jpeg or png only, limited to 2MB. Needs auth token.
    Body : form-data KEY: avatar VALUE: pic.jpg

  • GET /users/me/avatar: Used to get avatar picture of the user. Needs auth token.

  • DELETE /users/me/avatar: Used to delete avatar picture of the user. Needs auth token.

  • POST /users/login: Used to login an existing user. JWT token is assigned to this user's session.
    Body - { "email": "[email protected]", "password": "pswrd123" }

  • POST /users/logout: Used to logout of current session. Needs auth token.

  • POST /users/logoutAll: Used to logout of all sessions of the user. Needs auth token.

  • GET /users/me: Used to get current logged-in user's profile information. Needs auth token.

  • PATCH /users/me: Used to modify profile information of an existing user. Needs auth token.
    Body - { "password": "myheartsastereo" }

  • DELETE /users/me: Used to delete current logged-in user and tasks associated with the user. Needs auth token.

  • POST /tasks: Used to create tasks for the current logged-in user. By default sets "completed" value to 'false'. Needs auth token.
    Body - { "description": "Task 1", "completed": "true" }

  • GET /tasks: Used to get current logged-in user's tasks. Needs auth token. Can include params like tasks?completed=false, tasks?limit=10&skip=20 and tasks?sortBy=createdAt:desc. Needs auth token.

  • GET /tasks/:id: Used to get a specific task by it's ID. Needs auth token.

  • PATCH /tasks/:id: Used to change a specific task's description or completed status by it's ID. Needs auth token.
    Body - { "description": "Task 2" }

  • DELETE /tasks/:id: Used to delete a specific task by it's ID. Needs auth token.

task-manager-api's People

Contributors

spriha27 avatar

Watchers

 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.