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

https://github.com/nxhawk/golang-rest-api


https://github.com/nxhawk/golang-rest-api

backend golang rest rest-api restful-api

Last synced: 23 days 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

Brad Traversy
[Traversy Media](http://www.traversymedia.com)

### Version

1.0.0

### License

This project is licensed under the MIT License