GreenLight is RESTful API for a movie Database The API is written in Go using httprouter. It returns JSON responses with the appropriate headers. Taken from the wonderful Let's Go Further book by Alex Edwards.
This API consists of the following end points
- GET /v1/healthcheck : Retrieve system information
- POST /v1/movies : Add a movie to the database
- GET /v1/movies/:id : Retrieve a movie by id
- PATCH /v1/movies/:id : Update movie information by id
- DELETE /v1/movie/:id : Delete a movie by id
You can also search the database using URL queary parameters Example:
curl -i 'addr:port/v1/movies?title="black"&sort="-year" ' # --> Return information about any movie whose title contains the word black
And more to come.
- Unit Tests
- Integration Tests
- Automatic Testing using github actions
- Documentation
The author did not put any licence on his code, this does not mean it is opensource; keep that in mind.