upsurge0 / instagram-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Instgram API

Submission for appointy tech

instagram-api is an api which is capable of creating
users and posts relationally using go and mongodb.

Features

  • Create/Get a user
  • Create/Get a post
  • Get all posts of user

Libraries

instagram-api uses 2 libraries.

Setup

Configure mongodb uri in main.go (line:28)

uri := "<mongo_connection_uri>"

To run:

go run .

Models

  • user
    • id
    • name
    • email
    • password (sha512 hashed)
  • post
    • id
    • caption
    • imageUrl
    • userId
    • timeCreated

Endpoints

  • user
    • /users/ - GET
    • /users/ - POST
  • post
    • /posts/ - GET
    • /posts/ - POST
    • /posts/users/<user_id> - GET

Unit Tests

Run in Postman

About


Languages

Language:Go 100.0%