Class: Broadcast

Broadcast

new Broadcast()

Class describes broadcast-specific fields and request logic
Source:

Extends

Methods

add(objectToAdd)

Adds object or array to collection.
Parameters:
Name Type Description
objectToAdd Object | Array Object or array to add to collection.
Inherited From:
Source:

each(functionToApply)

Applies function to every element in collection.
Parameters:
Name Type Description
functionToApply Function to apply to elements.
Inherited From:
Source:

fields(multipleArgs)

Determines list of fields to be retrieved from server. For example by "a.shows(LGI.Guide.channel.id, LGI.Guide.channel.name);"
Parameters:
Name Type Description
multipleArgs string You can add unlimited number of strings as multiple parameters.
Inherited From:
Source:

filter(multipleArgs)

Filters data by some of entity properties. For example "a.filter(LGI.Guide.channel.id.equalTo(1));"
Parameters:
Name Type Description
multipleArgs string You can add unlimited number of strings as multiple parameters.
Inherited From:
Source:

findAll(callback)

Retrieves all pages of data one by one and then executes callback.
Parameters:
Name Type Description
callback Function Callback to execute and pass response to.
Inherited From:
Source:

findNext(callback)

Retrieves next page of data.
Parameters:
Name Type Description
callback Function Callback to execute and pass response to.
Inherited From:
Source:

findOne(callback)

Retrieves one page of data.
Parameters:
Name Type Description
callback Function Callback to execute and pass response to.
Inherited From:
Source:

get(index)

Retrieves collection item by index.
Parameters:
Name Type Description
index Number Index of object to retrieve from collection.
Inherited From:
Source:

limit(limitTo)

Adds limitation to response data length. For example "a.limit(10);"
Parameters:
Name Type Description
limitTo number Number of maximum data elements in response.
Inherited From:
Source:

reset()

Resets data.
Inherited From:
Source:

sort(field, order)

Sets sorting field and order. For example "a.sort(LGI.Guide.broadcast.startTime);"
Parameters:
Name Type Argument Default Description
field string Field to sort records by.
order string <optional>
"asc" Determines order we want to sort records with - ascendant (asc) or descendant (desc).
Inherited From:
Source:

toArray()

Returns data as array.
Inherited From:
Source:

where(filter)

Returns all records which matches conditionalObject. For example if it is {a: 1} - method will return only objects from collection where 'a' property is present and is equal to 1
Parameters:
Name Type Description
filter Object Filter descriptor object.
Inherited From:
Source: