Home Manual Reference Source Test Repository
public class | source

Movies

Class for getting movie data from the MongoDB.

Test:

Constructor Summary

Public Constructor
public

Create a movies object.

Method Summary

Public Methods
public

getMovie(req: Request, res: Response, next: Function): Movie

Get info from one movie.

public

getMovies(req: Request, res: Response, next: Function): String[]

Get all the pages.

public

getPage(req: Request, res: Response, next: Function): Movie[]

Get one page.

public

getRandomMovie(req: Request, res: Response, next: Function): Movie

Get a random movie.

Public Constructors

public constructor source

Create a movies object.

Public Methods

public getMovie(req: Request, res: Response, next: Function): Movie source

Get info from one movie.

Params:

NameTypeAttributeDescription
req Request

The express request object.

res Response

The express response object.

next Function

The next function for Express.

Return:

Movie

The details of a single movie.

Test:

public getMovies(req: Request, res: Response, next: Function): String[] source

Get all the pages.

Params:

NameTypeAttributeDescription
req Request

The express request object.

res Response

The express response object.

next Function

The next function for Express.

Return:

String[]

A list of pages which are available.

Test:

public getPage(req: Request, res: Response, next: Function): Movie[] source

Get one page.

Params:

NameTypeAttributeDescription
req Request

The express request object.

res Response

The express response object.

next Function

The next function for Express.

Return:

Movie[]

The contents of one page.

Test:

public getRandomMovie(req: Request, res: Response, next: Function): Movie source

Get a random movie.

Params:

NameTypeAttributeDescription
req Request

The express request object.

res Response

The express response object.

next Function

The next function for Express.

Return:

Movie

A random movie.

Test: