Skip to content

robmcl4/Glug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Glug

Build Status

Glug is a haskell-based CLI and Javascript API for for making word-finding games from movies.

Usage

glug.exe [--cli | --api]

For full API support save your api key for The Movie Database to the environment variable TMDB_KEY.

The web server listens on port 3000. This can be changed by setting the PORT environment variable.

Installation

Install Haskell Stack.

> stack setup

> stack [build | test]

Execute your stack binary:

> stack exec glug-exe -- [--cli | --api]

API

GET /titles/{title}

Searches for the given title name and returns possible candidates. Please urlencode the title.

[
  {
    "ref": "L3N1YnRpdGxlcy9maW5kaW5nLW5lbW8=",
    "title": "Finding Nemo",
    "subs": 194
  }
]

GET /words/{ref}

Gets interesting words from the chosen movie. Based on the path to the ref supplied by /titles/{title}.

{
  "imdbid": "tt0266543",
  "runtime": 6000,
  "ranked_words": [
    {
      "word": "foo",
      "occurrences": [100, 4500, 5664]
    }
  ]
}

GET /title/{imdbid}

Gets a handful of information about the given movie from The Movie Database.

{
  "runtime": 6000,
  "poster":  "/zjqInUwldOBa0q07fOyohYCWxWX.jpg",
  "overview": "A tale which follows the comedic and eventful journeys of two fish, the fretful ..."
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published