https://github.com/bluebigthink/go-trying
https://github.com/bluebigthink/go-trying
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/bluebigthink/go-trying
- Owner: BlueBigThink
- Created: 2024-06-23T00:40:08.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-23T00:40:27.000Z (about 2 years ago)
- Last Synced: 2025-03-21T08:26:23.571Z (over 1 year ago)
- Language: Go
- Size: 1.95 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple GO Lang REST API
> Simple RESTful API to create, read, update and delete books. No database implementation yet
## Quick Start
``` bash
# Install mux router
go get -u github.com/gorilla/mux
```
``` bash
go build
./go_restapi
```
## Endpoints
### Get All Books
``` bash
GET api/books
```
### Get Single Book
``` bash
GET api/books/{id}
```
### Delete Book
``` bash
DELETE api/books/{id}
```
### Create Book
``` bash
POST api/books
# Request sample
# {
# "isbn":"4545454",
# "title":"Book Three",
# "author":{"firstname":"Harry", "lastname":"White"}
# }
```
### Update Book
``` bash
PUT api/books/{id}
# Request sample
# {
# "isbn":"4545454",
# "title":"Updated Title",
# "author":{"firstname":"Harry", "lastname":"White"}
# }
```
```
## App Info
### Author
BlueBigThink
### Version
1.0.0
### License
This project is licensed under the MIT License