An open API service indexing awesome lists of open source software.

https://github.com/bluebigthink/go-trying


https://github.com/bluebigthink/go-trying

Last synced: about 1 month ago
JSON representation

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