luckbuy

command module
v0.0.0-...-b6b44a3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2022 License: MIT Imports: 12 Imported by: 0

README

luckbuy

LuckBuy Home Assignment

How to run

  1. Install postgres database
  2. Run go run main.go to run API server
Example
1) Signup API


curl --location --request POST 'http://localhost:8080/api/v1/signup' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "[email protected]",
    "password": "nithiya123",
    "refferral_code": "[email protected]"
}'
2) Login

curl --location --request POST 'http://localhost:8080/api/v1/login' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "[email protected]",
    "password": "gopi123"
}'

3) MyPoints

curl --location --request GET 'http://localhost:8080/api/v1/points' \
--header 'session_id: Z29waUBnbWFpbC5jb20xNjQ0ODQ5OTE3'
4) Leaderboard

curl --location --request GET 'http://localhost:8080/api/v1/leaderboard' \
--header 'session_id: Z29waUBnbWFpbC5jb20xNjQ0ODQ5NjE5'
5) Logout

curl --location --request GET 'http://localhost:8080/api/v1/logout' \
--header 'session_id: Z29waUBnbWFpbC5jb20xNjQ0ODQ5NjE5'

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL