Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/susrutadas/appointy_task-instagram-backend-api

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/susrutadas/appointy_task-instagram-backend-api

  • v0.0.0-20211009183040-032eea5abc4d
  • Source
  • Go
  • Socket score

Version published
Created
Source

Task | Instagram Backend API

Name: Susruta Das Registration Number: 19BEC1366 University: Vellore Institute of Technology, Chennai

Create a user
  POST /users
  
  payload = {
    id
    name
    email
    password
  }
Get users By ID
  GET /users/{id}
Create a post
  POST /posts
  
  payload = {
    id
    caption
    image
    timestamp
  }
Get post By ID
  GET /posts/{id}
Get all posts by a user
  GET /posts/users/{id}

Testing Instructions

1. Run Main file

go run main.go

2. Simulate requests using curl

  • To create an User
curl -X POST -H 'content-type: application/json' --data '{"id":"2","name":"Appointy","email":"Appointy@gmail.com","password":"123xyz"}' http://localhost:8080/users
  • To get User details from User ID
curl http://localhost:8080/users/1
  • To create a new post using User ID
curl -X POST -H 'content-type: application/json' --data '{"id":"2","caption":"Beautiful walls","image":"walls.png","timestamp":"2021-10-09T13:49:51.141Z"}' http://localhost:8080/posts
  • To Get a post using id
curl http://localhost:8080/posts/1
  • To list all posts of user
curl http://localhost:8080/posts

FAQs

Package last updated on 09 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc