Skip to content

Latest commit

 

History

History
74 lines (55 loc) · 1018 Bytes

README.md

File metadata and controls

74 lines (55 loc) · 1018 Bytes

A very simple K-tor based REST API

This repo is other version of my previous golang movie rest API: https://github.com/muhrahmatullah/go_movie

TODO : use database instead of List

Quick Start

clone the repository and open it in your preffered IDE (recommended using intellij)
run the app
check the log and it will show the url with the port
ex: [main] INFO  Application - Responding at http://0.0.0.0:8080

Endpoints

Get All Movies

GET movies

Get Single Movie

GET movie/{id}

Delete Movie

DELETE movie/{id}

Create Movie

POST movie/

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

Update Movie

PUT movies/{id}

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

Author

Muh Rahmatullah