Home Manual Reference Source Test Repository
public class | source

Shows

class for getting show data from the MongoDB.

Test:

Constructor Summary

Public Constructor
public

Create a shows object.

Method Summary

Public Methods
public

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

Get one page.

public

getRandomShow(req: Request, res: Response, next: Function): Show

Get a random show.

public

getShow(req: Request, res: Response, next: Function): Show

Get info from one show.

public

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

Get all the pages.

Public Constructors

public constructor source

Create a shows object.

Public Methods

public getPage(req: Request, res: Response, next: Function): Show[] 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:

Show[]

The contents of one page.

Test:

public getRandomShow(req: Request, res: Response, next: Function): Show source

Get a random show.

Params:

NameTypeAttributeDescription
req Request

The express request object.

res Response

The express response object.

next Function

The next function for Express.

Return:

Show

A random show.

Test:

public getShow(req: Request, res: Response, next: Function): Show source

Get info from one show.

Params:

NameTypeAttributeDescription
req Request

The express request object.

res Response

The express response object.

next Function

The next function for Express.

Return:

Show

The details of a single show.

Test:

public getShows(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: