Skip to content

Grihit/InstagramAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Appointy_InstagramAPI

An Instagram API made using Go and MongoDB

Tasks that can be performed by this API

  1. Create an User (POST request)
    URL used: http://localhost:27017/users
    Create A User 1 The data is entered in body in JSON format and _id is automatically created
    Create A User 2 The user is successfully inserted to the database

  2. Get user using id (GET request)
    URL used: http://localhost:27017/users/6161701c6c8378c960d53965
    Get User using id The User details of the user id in the url is displayed

  3. Create a post (POST request)
    URL used: http://localhost:27017/posts
    Create a post 1 The data is entered in body in JSON format and _id is automatically created
    Create a post 2 The post is successfully inserted to the database

  4. Get post using post id (GET request)
    URL used: http://localhost:27017/posts/61617ca36c8378aef4d0a3a9
    Get post using post id The post details of the post id in the url is displayed

  5. Get all posts of a specific user (GET request)
    URL used: http://localhost:27017/posts/users/61617076dc25d3de5f044084
    Get all posts of a specific user Get all posts of a specific user 2 All the posts of the user with the user id in the url are displayed

  6. Get all users (GET request)
    URL used: http://localhost:27017/users
    Get all users Details of all the users in the database

  7. Get all posts (GET request)
    URL used: http://localhost:27017/posts
    Get all posts Details of all the posts in the database


Note: The (upper)body data has no significance when the request is GET

How to run

  1. Run the command mongod in your cmd terminal at the directory where mongodb is installed.
  2. Make sure a database is created with the name Instagram.
  3. Use mongodb compass for easy creation of database and also for viewing the data in the database.
  4. Use the URLs in a service like postman for POST and GET requests.

About

An Instagram API made using Go and MongoDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages