Skip to content

gerard-morera/sinatra-rom-api-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is the first time I used ROM so provably I have not applied its bets practices.

This API has 4 simple endpoints:

  • GET '/movies' - Retrives all movies.
  • GET '/seasons' - Retrives all seasons with its episodes.
  • GET '/' - Retrives the catalog.
  • GET '/library' - Retrives last 3 days purchased movies & seasons.
  • POST '/purchase' - Performs a pruchase. i.e curl --data "user_id=1&video_quality=2&season_id=1" http://localhost:4561/purchase

To run the server:

rackup -p 4561

About

Sinatra api example with ROM

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages