Giter VIP home page Giter VIP logo

restful-api-for-a-simple-blogging-platform's Introduction

A mini version of a RESTful API

Documentation

Created task deployed on below link :

https://restful-api-for-simple-blog-platform.onrender.com

Demo Credentials

email : [email protected]

password : 1

for register new user

post method:

endpoint: https://restful-api-for-simple-blog-platform.onrender.com/auth/register

    formData : {
        "email":"xxxx",
        "name":"xxxx",
        "password":"xxxx"
    }

for confirming new user account

patch method:

endpoint: https://restful-api-for-simple-blog-platform.onrender.com/auth/confirm/:id

Note: ID can be found in conformation mail which was send during registration time

for login user

post method:

endpoint: https://restful-api-for-simple-blog-platform.onrender.com/auth/login

    formData : {
        "email":"xxxx",
        "password":"xxxx"
    }

Note: once logged in Token and user data will be share, use the token for authorization while commenting and post.

Incase user forgot password

put method:

endpoint: https://restful-api-for-simple-blog-platform.onrender.com/auth/forgotPassword

    formData : {
        "email":"xxxx"
    }

Note: Forgot reset link will be shared to register mail.

for resetting password of user

patch method:

endpoint: https://restful-api-for-simple-blog-platform.onrender.com/auth/resetPassword/:resetToken

    formData : {
        "password":"xxxx"
    }

Note: resetToken can be found in mail.

for getting all post

get method:

endpoint: https://restful-api-for-simple-blog-platform.onrender.com/posts

Note: token need to be passed as Authorization in Headers for getting all posts.

    headers: {
      authorization: `bearer ${token}`,
    },

for getting one post

get method:

endpoint: https://restful-api-for-simple-blog-platform.onrender.com/posts/:postid

Note: token need to be passed as Authorization in Headers for getting all posts and also postId need to passed in Params.

    headers: {
      authorization: `bearer ${token}`,
    },

for creating new post

post method:

endpoint: https://restful-api-for-simple-blog-platform.onrender.com/posts

Note: token need to be passed as Authorization in Headers for creating new posts.

    formData : {
        "userId":"xxxx",
        "description":"xxxx"
    }
    headers: {
      authorization: `bearer ${token}`,
    },

for editing post

patch method:

endpoint: https://restful-api-for-simple-blog-platform.onrender.com/posts/:postid

Note: token need to be passed as Authorization in Headers for creating new posts. And also postid need to passed as params.

    formData : {
        "description":"xxxx"
    }
    headers: {
      authorization: `bearer ${token}`,
    },

for deleting post

delete method:

endpoint: https://restful-api-for-simple-blog-platform.onrender.com/posts/:postid

Note: token need to be passed as Authorization in Headers for creating new posts. And also postid need to passed as params.

    headers: {
      authorization: `bearer ${token}`,
    },

for getting comment of a post

get method:

endpoint: https://restful-api-for-simple-blog-platform.onrender.com/posts/comments/:postid

Note: token need to be passed as Authorization in Headers for creating new posts. And also postid need to passed as params.

    headers: {
      authorization: `bearer ${token}`,
    },

for creating new comment for a post

post method:

endpoint: https://restful-api-for-simple-blog-platform.onrender.com/posts/comments/:postid

Note: token need to be passed as Authorization in Headers for creating new posts. And also postid need to passed as params.

    formData : {
        "comment":"xxxx"
    }
    headers: {
      authorization: `bearer ${token}`,
    },

for editing comment of a post

patch method:

endpoint: https://restful-api-for-simple-blog-platform.onrender.com/posts/comments/:commentid

Note: token need to be passed as Authorization in Headers for creating new posts. And also commentid need to passed as params.

    formData : {
        "comment":"xxxx"
    }
    headers: {
      authorization: `bearer ${token}`,
    },

for deleting comment of a post

delete method:

endpoint: https://restful-api-for-simple-blog-platform.onrender.com/posts/comments/:commentid

Note: token need to be passed as Authorization in Headers for creating new posts. And also commentid need to passed as params.

    headers: {
      authorization: `bearer ${token}`,
    },

restful-api-for-a-simple-blogging-platform's People

Contributors

suriya-k7 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.