Interface: Programs

Programs

Fetches relevant data for programs from CMS, Twenty Three,
external recommendation system, and local database with relevant info.

Methods

<static> cover(slug, size) → {Binary}

/programs/cover/:slug

Returns cover image for relevant program

Parameters:
Name Type Argument Description
slug string | int

Slug of program or program id from 23video

size int <optional>

Resize image to given size (remains a square image)

See:
  • /programs/cover/ak-24syv
  • /programs/cover/3843145
Returns:

Yields the relevant cover image.

Type
Binary

<static> cover(slug, size) → {Binary}

/v2/programs/cover/:slug

Returns cover image for relevant program

Parameters:
Name Type Argument Description
slug string | int

Slug of program or program id from 23video

size int <optional>

Resize image to given size (remains a square image)

See:
  • /v2/programs/cover/ak-24syv
  • /v2/programs/cover/3843145
Returns:

Yields the relevant cover image.

Type
Binary

<static> index() → {Array.<ConciseProgram>}

/programs

Get a list of all programs

See:
  • /programs
Returns:

Array of ConciseProgram objects.

Type
Array.<ConciseProgram>

<static> index() → {Array.<ConciseProgram>}

/v2/programs

Get a list of all programs

See:
  • /v2/programs
Returns:

Array of ConciseProgram objects.

Type
Array.<ConciseProgram>

<static> player(slug) → {Object}

/programs/topic/:slug

Get info for embed players

Parameters:
Name Type Description
slug string | int

Slug of program or program id from 23video

See:
  • /programs/topic/ak-24syv
  • /programs/topic/3843145
Returns:

Yields object with info relevant for embed players.

Type
Object

<static> player(slug) → {Object}

/v2/programs/topic/:slug

Get info for embed players

Parameters:
Name Type Description
slug string | int

Slug of program or program id from 23video

See:
  • /v2/programs/topic/ak-24syv
  • /v2/programs/topic/3843145
Returns:

Yields object with info relevant for embed players.

Type
Object

<static> popular(since, limit) → {Array.<Program>}

Fetches popular programs since given parameter.
Note, if given param is invalid the default value will be 'yesterday'.

Parameters:
Name Type Argument Default Description
since string

can be either 'yesterday', 'week', 'two-weeks', or 'month'.

limit int <optional>
0

truncate results found to this value.

Returns:

Array of programs objects describing popular programs
with number of played podcasts per program (top 50 podcasts).

Type
Array.<Program>

<static> recommend(viewed, limit, userId) → {Array.<ConcisePrograms>}

Calls prediction software with viewed to get a list of recommendations.
If no list is given or call to prediction fails, will return empty array.
If program lookup fails, will return whatever programs it succeeded in fetching (may be empty).

Parameters:
Name Type Argument Default Description
viewed array <optional>

array of viewed programs

limit int <optional>
4

number of returned objects

userId string <optional>

if no id is given a random id is generated.

Returns:

Array of ConcisePrograms is returned.
Note, the userId is also returned.

Type
Array.<ConcisePrograms>

<static> recommend(viewed, limit, userId) → {Array.<ConcisePrograms>}

Calls prediction software with viewed to get a list of recommendations.
If no list is given or call to prediction fails, will return empty array.
If program lookup fails, will return whatever programs it succeeded in fetching (may be empty).

Parameters:
Name Type Argument Default Description
viewed array <optional>

array of viewed programs

limit int <optional>
4

number of returned objects

userId string <optional>

if no id is given a random id is generated.

Returns:

Array of ConcisePrograms is returned.
Note, the userId is also returned.

Type
Array.<ConcisePrograms>

<static> show(slug) → {Program}

/programs/:slug

Get a specific program

Parameters:
Name Type Description
slug string | int

Slug of program or program id from 23video

See:
  • /programs/ak-24syv
  • /programs/3843145
Returns:

Program object

Type
Program

<static> show(slug) → {Program}

/v2/programs/:slug

Get a specific program

Parameters:
Name Type Description
slug string | int

Slug of program or program id from 23video

See:
  • /v2/programs/ak-24syv
  • /v2/programs/3843145
Returns:

Program object

Type
Program

<static> subpage(slug) → {Page}

/v2/programs/subpage/:slug

Get a specific subpage for program

Parameters:
Name Type Description
slug string | int

Slug of subpage

Returns:

Page object

Type
Page

Interface: Programs

Programs

Fetches relevant data for programs from CMS, Twenty Three,
external recommendation system, and local database with relevant info.

Methods

<static> cover(slug, size) → {Binary}

/programs/cover/:slug

Returns cover image for relevant program

Parameters:
Name Type Argument Description
slug string | int

Slug of program or program id from 23video

size int <optional>

Resize image to given size (remains a square image)

See:
  • /programs/cover/ak-24syv
  • /programs/cover/3843145
Returns:

Yields the relevant cover image.

Type
Binary

<static> cover(slug, size) → {Binary}

/v2/programs/cover/:slug

Returns cover image for relevant program

Parameters:
Name Type Argument Description
slug string | int

Slug of program or program id from 23video

size int <optional>

Resize image to given size (remains a square image)

See:
  • /v2/programs/cover/ak-24syv
  • /v2/programs/cover/3843145
Returns:

Yields the relevant cover image.

Type
Binary

<static> index() → {Array.<ConciseProgram>}

/programs

Get a list of all programs

See:
  • /programs
Returns:

Array of ConciseProgram objects.

Type
Array.<ConciseProgram>

<static> index() → {Array.<ConciseProgram>}

/v2/programs

Get a list of all programs

See:
  • /v2/programs
Returns:

Array of ConciseProgram objects.

Type
Array.<ConciseProgram>

<static> player(slug) → {Object}

/programs/topic/:slug

Get info for embed players

Parameters:
Name Type Description
slug string | int

Slug of program or program id from 23video

See:
  • /programs/topic/ak-24syv
  • /programs/topic/3843145
Returns:

Yields object with info relevant for embed players.

Type
Object

<static> player(slug) → {Object}

/v2/programs/topic/:slug

Get info for embed players

Parameters:
Name Type Description
slug string | int

Slug of program or program id from 23video

See:
  • /v2/programs/topic/ak-24syv
  • /v2/programs/topic/3843145
Returns:

Yields object with info relevant for embed players.

Type
Object

<static> popular(since, limit) → {Array.<Program>}

Fetches popular programs since given parameter.
Note, if given param is invalid the default value will be 'yesterday'.

Parameters:
Name Type Argument Default Description
since string

can be either 'yesterday', 'week', 'two-weeks', or 'month'.

limit int <optional>
0

truncate results found to this value.

Returns:

Array of programs objects describing popular programs
with number of played podcasts per program (top 50 podcasts).

Type
Array.<Program>

<static> recommend(viewed, limit, userId) → {Array.<ConcisePrograms>}

Calls prediction software with viewed to get a list of recommendations.
If no list is given or call to prediction fails, will return empty array.
If program lookup fails, will return whatever programs it succeeded in fetching (may be empty).

Parameters:
Name Type Argument Default Description
viewed array <optional>

array of viewed programs

limit int <optional>
4

number of returned objects

userId string <optional>

if no id is given a random id is generated.

Returns:

Array of ConcisePrograms is returned.
Note, the userId is also returned.

Type
Array.<ConcisePrograms>

<static> recommend(viewed, limit, userId) → {Array.<ConcisePrograms>}

Calls prediction software with viewed to get a list of recommendations.
If no list is given or call to prediction fails, will return empty array.
If program lookup fails, will return whatever programs it succeeded in fetching (may be empty).

Parameters:
Name Type Argument Default Description
viewed array <optional>

array of viewed programs

limit int <optional>
4

number of returned objects

userId string <optional>

if no id is given a random id is generated.

Returns:

Array of ConcisePrograms is returned.
Note, the userId is also returned.

Type
Array.<ConcisePrograms>

<static> show(slug) → {Program}

/programs/:slug

Get a specific program

Parameters:
Name Type Description
slug string | int

Slug of program or program id from 23video

See:
  • /programs/ak-24syv
  • /programs/3843145
Returns:

Program object

Type
Program

<static> show(slug) → {Program}

/v2/programs/:slug

Get a specific program

Parameters:
Name Type Description
slug string | int

Slug of program or program id from 23video

See:
  • /v2/programs/ak-24syv
  • /v2/programs/3843145
Returns:

Program object

Type
Program

<static> subpage(slug) → {Page}

/v2/programs/subpage/:slug

Get a specific subpage for program

Parameters:
Name Type Description
slug string | int

Slug of subpage

Returns:

Page object

Type
Page