Skip to content

Latest commit

 

History

History
54 lines (35 loc) · 981 Bytes

README.md

File metadata and controls

54 lines (35 loc) · 981 Bytes

Instagram-Backend-API-Appointy

Git repository for appointy TECH task

Run

Run server with login credentials as a env variables

USER_EMAIL=test USER_PW=test go run main.go
curl localhost:8080/user -u test:test

local-login


POST a post

curl localhost:8080/post -X POST -d '{"Caption":"This is a caption for some other image","ImageURL":"SomeOtherImageLink","ID":"id_3","PostTS":"2009-11-10 02:00:00 +0000 UTC m=+0.000000001"}' -H "Content-Type: application/json"

POST-post


Get all the existing posts

curl localhost:8080/post`

get-posts


GET a post by ID

curl localhost:8080/posts/1633784307862447000`

get-post-by-id


Completed tasks

  • Create an User
  • Get a user using id
  • Create a Post
  • Get a post using id
  • List all posts

Note - API has been developed for local purposes only as of now.