This project is an API that allows authors to create, manage, and interact with their blog-related content, and users. This API serves as the backend for a blog platform and offers various endpoints to perform actions such as creating authors, writing and updating blog posts, liking blogs, posting comments, and more.
Returns the author with thier blog
https://bloggerapi.onrender.com/author/652dae90e69ca3127d6921e4
Content-Type | Value |
---|---|
Content-Type | application/json |
{
"message": "Successfully fetched blogs.",
"blogLists": [
{
"authorName": "Test Acc, Test2 Acc2",
"authorEmails": "testacc@gmail.com, testacc2@gmail.com",
"blogTitle": "asdf asdf asdf asdf",
"blogContent": "qwer qwer qwer qwer",
"blogLike": 6,
"blogView": 55,
"comments": [
{
"comment": "Cool Blog",
"userFullName": "User One",
"userEmail": "userone@gmail.com"
}
]
}
]
}
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
Creates a new author
https://bloggerapi.onrender.com/author/create
Content-Type | Value |
---|---|
Content-Type | application/json |
{
"fname": "Test2",
"lname": "Acc2",
"email": "testacc2@gmail.com"
}
null
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
Usage: /author/authorId
Updates an author with a give fname (Optional), lname (Optional) and email (Optional).
https://bloggerapi.onrender.com/author/update/652daae740a77ddb99c63d29
Content-Type | Value |
---|---|
Content-Type | application/json |
{
"fname": "Test4",
"lname": "Acc4"
}
{
"message": "Author updated successfully!",
"author": {
"_id": "652daae740a77ddb99c63d29",
"fname": "Test4",
"lname": "Acc4",
"email": "testacc3@gmail.com",
"blogs": [],
"__v": 0
}
}
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
Usage: author/authorId
Deletes author specified by authorId
https://bloggerapi.onrender.com/author/delete/652dadd4e69ca3127d6921da
Content-Type | Value |
---|---|
Content-Type | application/json |
{
"message": "Author deleted successfully!"
}
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
Fetchs specifed blogId avaliable blogs
https://bloggerapi.onrender.com/blog/652e39b05ca21ddaf9d14145
{
"message": "Blog fetched successfully!",
"populatedBlog": {
"authorName": "Test Acc, Test2 Acc2",
"authorEmails": "testacc@gmail.com, testacc2@gmail.com",
"blogTitle": "asdf asdf asdf asdf",
"blogContent": "qwer qwer qwer qwer",
"blogLike": 6,
"blogView": 56,
"comments": [
{
"comment": "Cool Blog",
"userFullName": "User One",
"userEmail": "userone@gmail.com"
}
]
}
}
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
Fetchs all avaliable blogs
https://bloggerapi.onrender.com/blog
{
"message": "Blog fetched successfully!",
"blogLists": [
{
"authorName": "Test2 Acc, Test4 Acc4",
"authorEmails": "testacc3@gmail.com, testacc4@gmail.com",
"blogTitle": "asdf asdf asdf asdf",
"blogContent": "qwer qwer qwer qwer",
"blogLike": 0,
"blogView": 1,
"comments": []
}
]
}
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
/blog/create is used to create a blog
authorIds is an array. So you can pass two authorIds to create a blog as co-authored or used single authorId in the array to create as single author
https://bloggerapi.onrender.com/blog/create
Content-Type | Value |
---|---|
Content-Type | application/json |
{
"authorIds": ["652e746a7dcf222f7b81adcf", "652e7535f3ca0ee04859432b"],
"title": "asdf asdf asdf asdf",
"content": "qwer qwer qwer qwer"
}
{
"message": "Blog created successfully!",
"blog": {
"title": "asdf asdf asdf asdf",
"content": "qwer qwer qwer qwer",
"like": 0,
"view": 0,
"authors": [
"652dae90e69ca3127d6921e4",
"652dae97e69ca3127d6921e7"
],
"comments": [],
"_id": "652daf201d0e59821d462056",
"__v": 0
}
}
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
Usage: blog/update/blogId
Updates(Edit) the specifed blogId the the passed attributes. both title and content are optionals so you can update on of them or both.
https://bloggerapi.onrender.com/blog/update/652daf201d0e59821d462056
Content-Type | Value |
---|---|
Content-Type | application/json |
{
"title": "zxcv zxcv",
"content": "mnbv mnbv"
}
{
"message": "Blog updated successfully!",
"blog": {
"_id": "652daf201d0e59821d462056",
"title": "zxcv zxcv",
"content": "mnbv mnbv",
"like": 0,
"view": 0,
"authors": [
"652dae90e69ca3127d6921e4",
"652dae97e69ca3127d6921e7"
],
"comments": [],
"__v": 0
}
}
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
Deleted specified blog in the URL
https://bloggerapi.onrender.com/blog/delete/652e38ef5ca21ddaf9d14139
Content-Type | Value |
---|---|
Content-Type | application/json |
{
"message": "Blog deleted successfully!",
"blog": {
"_id": "652e38ef5ca21ddaf9d14139",
"title": "asdf asdf asdf asdf",
"content": "qwer qwer qwer qwer",
"like": 0,
"view": 0,
"authors": [
"652dae90e69ca3127d6921e4",
"652dae97e69ca3127d6921e7"
],
"comments": [],
"__v": 0
}
}
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
Like specified blog
https://bloggerapi.onrender.com/blog/like/652e75477dcf222f7b81add4
{
"message": "Blog liked successfully!",
"blog": {
"_id": "652e75477dcf222f7b81add4",
"title": "zxcv zxcv",
"content": "mnbv mnbv",
"like": 1,
"view": 1,
"authors": [
"652e746a7dcf222f7b81adcf",
"652e7535f3ca0ee04859432b"
],
"comments": [],
"__v": 0
}
}
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
Fetch specific comment
https://bloggerapi.onrender.com/comment/652e549c43a7ac140d83f4d3
{
"message": "Comment fetched successfully!",
"comment": {
"_id": "652e549c43a7ac140d83f4d3",
"comment": "Cool Blog",
"__v": 0,
"user": {
"_id": "652e4d3b07254fc448841124",
"fname": "User",
"lname": "One",
"email": "userone@gmail.com",
"comments": [
"652e549c43a7ac140d83f4d3"
],
"__v": 2
},
"blog": {
"_id": "652e39b05ca21ddaf9d14145",
"title": "asdf asdf asdf asdf",
"content": "qwer qwer qwer qwer",
"like": 0,
"view": 0,
"authors": [
"652dae90e69ca3127d6921e4",
"652dae97e69ca3127d6921e7"
],
"comments": [
"652e549c43a7ac140d83f4d3"
],
"__v": 4
}
}
}
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
Gives a comment on specific blog.
Usage /comment/commentId
https://bloggerapi.onrender.com/comment/create
Content-Type | Value |
---|---|
Content-Type | application/json |
{
"comment": "Cool Blog",
"blogId": "652e39b05ca21ddaf9d14145",
"userId": "652e4d3b07254fc448841124"
}
{
"message": "Comment created successfully!",
"comment": {
"comment": "Cool Blog",
"userId": "652e3ace5ca21ddaf9d14148",
"blogId": "652e39b05ca21ddaf9d14145",
"_id": "652e4a8a1ff30f00a9500c04",
"__v": 0
}
}
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
Gives a comment on specific blog.
Usage /comment/commentId
https://bloggerapi.onrender.com/comment/update/652e4d5a07254fc448841128
{
"comment": "Great Blog"
}
{
"message": "Comment updated successfully!",
"comment": {
"_id": "652e4d5a07254fc448841128",
"comment": "Great Blog",
"userId": "652e4d3b07254fc448841124",
"blogId": "652e39b05ca21ddaf9d14145",
"__v": 0
}
}
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
Deletes specified comment
https://bloggerapi.onrender.com/comment/delete/652e4d5a07254fc448841128
{
"message": "Comment deleted successfully!",
"comment": {
"_id": "652e4d5a07254fc448841128",
"comment": "Great Blog",
"userId": "652e4d3b07254fc448841124",
"blogId": "652e39b05ca21ddaf9d14145",
"__v": 0
}
}
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
Fetch specified user with the comment
https://bloggerapi.onrender.com/user/652e4d3b07254fc448841124
{
"message": "Successfully fetched user.",
"user": {
"_id": "652e4d3b07254fc448841124",
"fname": "User",
"lname": "One",
"email": "userone@gmail.com",
"comments": [
{
"_id": "652e549c43a7ac140d83f4d3",
"comment": "Cool Blog",
"__v": 0,
"user": "652e4d3b07254fc448841124",
"blog": "652e39b05ca21ddaf9d14145"
}
],
"__v": 2
}
}
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
Creates a new user
https://bloggerapi.onrender.com/user/create
{
"fname": "User",
"lname": "One",
"email": "userone@gmail.com"
}
{
"message": "User created successfully!",
"user": {
"fname": "User",
"lname": "One",
"email": "userone@gmail.com",
"comments": [],
"_id": "652e3ace5ca21ddaf9d14148",
"__v": 0
}
}
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
Update specified user
https://bloggerapi.onrender.com/user/update/652e3ace5ca21ddaf9d14148
{
"fname": "Use",
"lname": "Two",
"email": "usertwo@gmail.com"
}
{
"message": "User updated successfully!",
"user": {
"_id": "652e3ace5ca21ddaf9d14148",
"fname": "Use",
"lname": "Two",
"email": "usertwo@gmail.com",
"comments": [],
"__v": 0
}
}
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
Delete specified User
https://bloggerapi.onrender.com/user/delete/652e3ace5ca21ddaf9d14148
{
"message": "User deleted successfully!"
}
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
Powered By: postman-to-markdown