Home Reference Source Repository
public class | source

OlapicMediaBatch

Extends:

OlapicBatch → OlapicMediaBatch

Get a paginated list of media entities.

Constructor Summary

Public Constructor
public

constructor(entity: OlapicEntity, sorting: String, limit: Number, rightsOnly: Boolean)

Create a new media batch.

Inherited Summary

From class OlapicBatch
public get

A quick shortcut to get access to the DevKit singleton.

public

Makes a request to the API and returns a entities list, or an Error if something goes wrong.

public

Checks whether there's a next page to load or not.

public

Checks whether there's a previous page to load or not.

public

Loads the batch next page.

public

Loads the batch previous page.

Public Constructors

public constructor(entity: OlapicEntity, sorting: String, limit: Number, rightsOnly: Boolean) source

Create a new media batch.

Override:

OlapicBatch#constructor

Params:

NameTypeAttributeDescription
entity OlapicEntity

A subclass of OlapicEntity which supports the following property path: 'resources/media/[sorting]/link', where sorting may be one of the supported sorting options by the Olapic API: recent, shuffled, photorank or rated.

sorting String
  • optional
  • default: 'recent'

One of the four supported sorting options by the Olapic API: recent, shuffled, photorank or rated.

limit Number
  • optional
  • default: 20

The amount of media per page.

rightsOnly Boolean
  • optional
  • default: false

If true, the batch will return only media that has its rights approved.