Skip to content

Latest commit

 

History

History
72 lines (54 loc) · 751 Bytes

README.md

File metadata and controls

72 lines (54 loc) · 751 Bytes

A very Simple GO Lang REST API

TODO : use database instead of slice

Quick Start

# Install mux router
go get -u github.com/gorilla/mux
go build
./Main

Endpoints

Get All Movies

GET movies

Get Single Movie

GET movies/{id}

Delete Movie

DELETE movies/{id}

Create Movie

POST movies/

# Request sample
{
	"title": "Mari Pulang",
	"rating": "5.6",
	"year": 2019,
	"actor": {
		"name": "Rahmatullah",
		"age": 22
	}
}

Update Movie

PUT movies/{id}

# Request sample
{
	"title": "Mari Pulang Bersama",
	"rating": "5.6",
	"year": 2019,
	"actor": {
		"name": "Rahmatullah aka matx",
		"age": 22
	}
}

Author

Muh Rahmatullah