This is a restful api that aloows a new user to be added and logged in, the user has ability to create a blog and add comments to a blog
Visit /users/signup
the add json data example
{
"fullname": "daniel maina",
"email" : "faith@gmail.com",
"password": "1234dan"
}
Visit /users/login
the add json data , the api will generate a token that you will use to interact with the api example json
{
"email" : "faith@gmail.com",
"password": "1234dan"
}
Visit post /blogs
the add json data, also ensure to add the token generated in your header/authorazition example
{
"title": "third blog",
"content": "this is the tfosdfsdru thdsdfsdf content of the blog post",
"reading_time": "1 minute"
}
Visit /blogs
Visit /blogs/:id
the id is the blog id
Visit /blogs/:id
the id is the blog id, example code
{
"title": "fifth blog",
"content": "this is the tfosdfsdru thdsdfsdf content of the blog post",
"reading_time": "1 minute"
}
Visit /blogs/:id
the id is the blog id
Visit /blogs/:id/comment
the id is the blog id , example code
{
"message" : "the second message"
}
Visit /blogs/:id/comment
the id is the blog id
Visit /blogs/:id/comment/:id
the first id is for the blog and the second one for the comment, example
{
"message" : "the fifth message"
}
Visit /blogs/:id/comment/:id
the first id is for the blog and the second one for the comment