1.0.1 • Published 9 years ago
harrypotter v1.0.1
harrypotter_nodejs
Package utilizes @andyrewlee's harry potter api. Link to his project can be found HERE.
Installation
npm install harrypotterUsage
Initialization
var hp = require('harrypotter');
var client = new hp();Callback:
This callback function requires two arguments, error and data. If the request fails, the error will be an Error object. Otherwise, the data argument will contain the JSON that is returned by the API.
Gets a list of movies:
client.getAllMovies(callback);Gets basic/detailed info for specified movie:
client.getMovieDetails(movieID, dispEmp, callback);Arguments:
movieID: string ID of moviedispEmp: boolean If true,getMovieDetails()provides detailed info pertaining to movie (i.e. employees of hogwarts).
Gets a list of hogwart employees:
client.getEmployees(callback);Gets basic/detailed info for specified employee:
client.getEmployeeInfo(empID, dispDetailed, callback);Arguments: