Feel free to import the Postman collection into your Postman workspace to explore and test the API endpoints.
-
Clone the repository:
$ git clone [email protected]:humaid0x/Book-Store-API.git
-
CD into the project directory:
$ cd Book-Store-API
-
Download module dependencies:
$ go mod download
-
Modify
app.env
contents as needed. -
Run the application:
$ go run main.go
- Endpoint:
POST /books/
- Body:
{"authorID": 1, "bookName": "Sample Book", "description": "Lorem ipsum dolor sit amet"}
- Endpoint:
GET /books/
- Endpoint:
PUT /books/{bookID}
- Body:
{"authorID": 2, "bookName": "Updated Book"}
- Endpoint:
DELETE /books/{bookID}
- Endpoint:
POST /authors/
- Body:
{"name": "John Doe", "address": "123 Main St"}
- Endpoint:
GET /authors/
- Endpoint:
PUT /authors/{authorID}
- Body:
{"name": "Updated Author", "address": "456 Oak St"}
- Endpoint:
DELETE /authors/{authorID}
- Endpoint:
POST /auth/signin
- Body:
{"username": "demo_user", "password": "demo_password"}
- Endpoint:
POST /auth/signup
- Body:
{"email": "[email protected]", "username": "demo_user", "password": "demo_password"}