new Broadcast()
Class describes broadcast-specific fields and request logic
- Source:
- entities/broadcast.js, line 1
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:
- collection.js, line 40
-
each(functionToApply)
-
Applies function to every element in collection.
Parameters:
Name Type Description functionToApply
Function to apply to elements. - Inherited From:
- Source:
- collection.js, line 16
-
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:
- entitybase.js, line 30
-
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:
- entitybase.js, line 61
-
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:
- entitybase.js, line 96
-
findNext(callback)
-
Retrieves next page of data.
Parameters:
Name Type Description callback
Function Callback to execute and pass response to. - Inherited From:
- Source:
- entitybase.js, line 86
-
findOne(callback)
-
Retrieves one page of data.
Parameters:
Name Type Description callback
Function Callback to execute and pass response to. - Inherited From:
- Source:
- entitybase.js, line 75
-
get(index)
-
Retrieves collection item by index.
Parameters:
Name Type Description index
Number Index of object to retrieve from collection. - Inherited From:
- Source:
- collection.js, line 53
-
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:
- entitybase.js, line 19
-
reset()
-
Resets data.
- Inherited From:
- Source:
- collection.js, line 71
-
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:
- entitybase.js, line 47
-
toArray()
-
Returns data as array.
- Inherited From:
- Source:
- collection.js, line 62
-
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:
- collection.js, line 25