GitXplorerGitXplorer
d

moviedialogs_api

public
0 stars
0 forks
1 issues

Commits

List of commits on branch master.
Verified
9e98a39de637fa29212459fce1c9d8a246a636f7

Merge pull request #18 from dornheimer/routes

ddornheimer committed 7 years ago
Unverified
5339fc633e41c57b83a05860ca7c25b1a117a5c9

handle base url prefix at the blueprint level

ddornheimer committed 7 years ago
Unverified
e06fbdac166a041c2898a90d366f0af0154b073f

add back single line endpoint, change url for multiple lines endpoint

ddornheimer committed 7 years ago
Unverified
a5abc6d9a0395fe8b4937a92fe0bd4196437bca8

use url_for to build urls

ddornheimer committed 7 years ago
Unverified
16b1e5fb9b75d195eb3aab7a98e3f36b0191f5a7

update tests, add tests for 404 error

ddornheimer committed 7 years ago
Unverified
af434565336908d8e00203618bb1c5ad901a033d

retrieve lines with their conversation id

ddornheimer committed 7 years ago

README

The README file for this repository.

Build Status

moviedialogs api

RESTful API for retrieving data provided by the Cornell Movie-Dialogs Corpus (Cristian Danescu-Niculescu-Mizil and Lillian Lee).

Setup

install pipenv:

pip install pipenv

install project dependencies:

pipenv install

create .env with commands or run manually:

export DATABASE_URI=<dialect://user:password@host/dbname>
export FLASK_APP=api

# enable development environment with debug mode
export FLASK_ENV=development

download corpus data and set up the database:

python setup.py postinstall

Start

flask run to run app on http://localhost:5000/

API Endpoints

Method URL Action
GET /api/characters/[string:character_id] Retrieve a character
GET /api/conversations/[int:conversation_id] Retrieve a conversation
GET /api/genres/[int:genre_id] Retrieve a genre
GET /api/lines/[string:line_id] Retrieve a line
GET /api/movies/[string:movie_id] Retrieve a movie

Movie data includes character and conversation IDs