Coder Social home page Coder Social logo

msib5-hacktiv8-golang-finalproject4's Introduction

FP4-Hacktiv8

forthebadge made-with-go

Berikut ini adalah final project ke-4 dari hacktiv8, aplikasi ini bernama Toko Belanja, Aplikasi ini akan dilengkapi dengan proses CRUD.

Anggota kelompok

  • Willyawan Maulana - GLNG-KS07-014
  • Dirham Triyadi - GLNG-KS07-025

Endpoint

Berikut ini adalah seluruh endpoint yang dapat diakses melalui client.

Users

Berikut ini adalah beberapa endpoint yang dapat diakses untuk tabel Users

Method URL
POST [https://fp4-hacktiv8-production.up.railway.app/users/register]
POST [https://fp4-hacktiv8-production.up.railway.app/users/login
PATCH [https://fp4-hacktiv8-production.up.railway.app/users/topup]
Daftar request users

POST Register User

{
   "full_name": "string",
   "email": "string",
   "password": "string"
}

POST Login User

{
   "email": "string",
   "password": "string"
}

PATCH User Topup

-Bearer Token

{
   "balance": integer
}

Note: Untuk method PATCH diperlukan autentikasi, sehingga perlu memasukan bearer token terlebih dahulu. Token didapatkan melalui response client saat melakukan login

Categories

Berikut ini adalah beberapa endpoint yang dapat diakses untuk tabel Categories

Method URL
POST [https://fp4-hacktiv8-production.up.railway.app/categories]
GET [https://fp4-hacktiv8-production.up.railway.app/categories]
PATCH [https://fp4-hacktiv8-production.up.railway.app/categories/:categoryId]
DELETE [https://fp4-hacktiv8-production.up.railway.app/categories/:categoryId]
Daftar request categories

POST Categories

-Bearer Token

{
   "type": "string"
}

GET Categories

-Bearer Token

PATCH Categories

-Bearer Token
-Param categoryID

{
   "type": "string"
}

DELETE Categories

-Bearer Token
-Param categoryID

Note: Seluruh endpoint hanya bisa diakses oleh user dengan role admin, sehingga perlu memasukan bearer token terlebih dahulu. Token didapatkan melalui response client saat melakukan login. Untuk methode PATCH dan DELETE diperlukan parameter Id pada URL

Products

Berikut ini adalah beberapa endpoint yang dapat diakses untuk tabel Products

Method URL
POST [https://fp4-hacktiv8-production.up.railway.app/products]
GET [https://fp4-hacktiv8-production.up.railway.app/products]
PUT [https://fp4-hacktiv8-production.up.railway.app/products/:productId]
DELETE [https://fp4-hacktiv8-production.up.railway.app/products/:productId]
Daftar request Products

POST Products

-Bearer Token

{
   "title": "string",
   "price": integer,
   "stock": integer,
   "category_id": integer
}

GET Products

-Bearer Token

PUT Products

-Bearer Token
-Param categoryID

{
   "title": "string",
   "price": integer,
   "stock": integer,
   "category_id": integer
}

DELETE Products

-Bearer Token
-Param categoryID

Note: Seluruh endpoint kecuali GET hanya bisa diakses oleh user dengan role admin, sehingga perlu memasukan bearer token terlebih dahulu. Token didapatkan melalui response client saat melakukan login. Untuk methode PUT dan DELETE diperlukan parameter Id pada URL.

TransactionHistories

Berikut ini adalah beberapa endpoint yang dapat diakses untuk tabel TransactionHistories

Method URL
POST [https://fp4-hacktiv8-production.up.railway.app/transactionhistories]
GET [https://fp4-hacktiv8-production.up.railway.app/transactionhistories/my-transactions]
GET [https://fp4-hacktiv8-production.up.railway.app/transactionhistories/user-transactions]
Daftar request TransactionHistories

POST transactions

-Bearer Token

{
   "product_id": integer,
   "quantity": integer
}

GET my-transactions

-Bearer Token

GET user-transactions

-Bearer Token

Note: Seluruh endpoint diperlukan autentikasi sehingga diharuskan memasukan bearer token terlebih dahulu. Token didapatkan melalui response client saat melakukan login. Untuk methode GET user-transactions hanya dapat diakses oleh user dengan role admin.

msib5-hacktiv8-golang-finalproject4's People

Contributors

dirhamtriyadi avatar xenopartyyy avatar

Watchers

 avatar

Forkers

xenopartyyy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.