Skip to content

CollCaz/GreenLight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GreenLight

What is this?

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.

How to use?

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.

How does this code differ from the book?

  • Unit Tests
  • Integration Tests
  • Automatic Testing using github actions
  • Documentation

Note on liscene

The author did not put any licence on his code, this does not mean it is opensource; keep that in mind.

About

Movie information API

Resources

Stars

Watchers

Forks

Contributors

Languages