return to home

Golang Book or Movie Review APIs

Book & Movie Review API 📚 📽️


What is this? 🎉

{
    "Recommendation": "Read the book first, then watch the movie.",
    "Title": "The Hobbit",
    "BookRating": "8.52",
    "MovieRating": "6.8",
    "MoviePlot": "A homebody hobbit in Middle Earth gets talked into joining a quest with a group of dwarves to recover their treasure from a dragon.",
    "BookPlot": "The Hobbit is a tale of high adventure, undertaken by a company of dwarves in search of dragon-guarded gold. A reluctant partner in this perilous quest is Bilbo Baggins, a comfort-loving unambitious hobbit, who surprises even himself by his resourcefulness and skill as a burglar.Encounters with trolls, goblins, dwarves, elves, and giant spiders, conversations with the dragon, Smaug, and a rather unwilling presence at the Battle of Five Armies are just some of the adventures that befall Bilbo.Bilbo Baggins has taken his place among the ranks of the immortals of children’s fiction. Written by Professor Tolkien for his children, The Hobbit met with instant critical acclaim when published.",
    "Author": "",
    "Director": "Jules Bass, Arthur Rankin Jr.",
    "Actors": "Orson Bean, Richard Boone, Hans Conried, John Huston",
    "BookPublished": "1937",
    "MovieReleased": "1977",
    "MovieAwards": "1 win  2 nominations."
}


Project Motivation 🤓

Learn more about the following:


How to use this API


API Routes

URL: GET /getbook:title

Example Query

GET http://localhost:8080/getbook?title=the%20hobbit

Success Response

{
    "Title": "The Hobbit",
    "Author": "",
    "Rating": "8.52",
    "Plot": "The Hobbit is a tale of high adventure, undertaken by a company of dwarves in search of dragon-guarded gold. A reluctant partner in this perilous quest is Bilbo Baggins, a comfort-loving unambitious hobbit, who surprises even himself by his resourcefulness and skill as a burglar.Encounters with trolls, goblins, dwarves, elves, and giant spiders, conversations with the dragon, Smaug, and a rather unwilling presence at the Battle of Five Armies are just some of the adventures that befall Bilbo.Bilbo Baggins has taken his place among the ranks of the immortals of children’s fiction. Written by Professor Tolkien for his children, The Hobbit met with instant critical acclaim when published.",
    "Year": "1937"
}

Fail Response

{
    "Status": "Error",
    "Code": "400",
    "Message": "Unable to find this title"
}

URL: GET /getmovie:title

Example Query

GET http://localhost:8080/getmovie?title=iron%20man

Success Response

{
    "Title": "iron man",
    "Rating": "7.9",
    "Actors": "Robert Downey Jr., Gwyneth Paltrow, Terrence Howard",
    "Director": "Jon Favreau",
    "Plot": "After being held captive in an Afghan cave, billionaire engineer Tony Stark creates a unique weaponized suit of armor to fight evil.",
    "ReleaseYear": "2008",
    "Awards": "Nominated for 2 Oscars. 21 wins  73 nominations total"
}

Fail Response

{
    "Status": "Error",
    "Code": "400",
    "Message": "Unable to find this title"
}

URL: GET /getreccomendation:title

Example Query

http://localhost:8080/getrecommendation?title=the%20hobbit

Success Response

{
    "Recommendation": "Read the book first, then watch the movie.",
    "Title": "The Hobbit",
    "BookRating": "8.52",
    "MovieRating": "6.8",
    "MoviePlot": "A homebody hobbit in Middle Earth gets talked into joining a quest with a group of dwarves to recover their treasure from a dragon.",
    "BookPlot": "The Hobbit is a tale of high adventure, undertaken by a company of dwarves in search of dragon-guarded gold. A reluctant partner in this perilous quest is Bilbo Baggins, a comfort-loving unambitious hobbit, who surprises even himself by his resourcefulness and skill as a burglar.Encounters with trolls, goblins, dwarves, elves, and giant spiders, conversations with the dragon, Smaug, and a rather unwilling presence at the Battle of Five Armies are just some of the adventures that befall Bilbo.Bilbo Baggins has taken his place among the ranks of the immortals of children’s fiction. Written by Professor Tolkien for his children, The Hobbit met with instant critical acclaim when published.",
    "Author": "",
    "Director": "Jules Bass, Arthur Rankin Jr.",
    "Actors": "Orson Bean, Richard Boone, Hans Conried, John Huston",
    "BookPublished": "1937",
    "MovieReleased": "1977",
    "MovieAwards": "1 win  2 nominations."
}

Failed Response

{
    "Status": "Error",
    "Code": "400",
    "Message": "Unable to find this title"
}

How to run the API locally?

In the root directory of the repo type the following:

go run main.go


How to run tests?

In the root directory of the repo type the following:

go test


How to run this in AWS lambda?

Coming soon…

©  2025  Rachel Wang 🦉  •   Powered By Moonwalk & Animation @glitchedneon    •   Github     •   LinkedIn