-
Notifications
You must be signed in to change notification settings - Fork 0
lobs.source
function source.doesSourceExistWithID(id: string)
-> exists: boolean
Check if a source exists with a certain ID.
@param id
— The ID of the source.
@return exists
— True if the source exists, false otherwise.
function source.doesSourceExistWithName(name: string)
-> exists: boolean
Check if a source exists with a certain name.
@param name
— The name of the source.
@return exists
— True if the source exists, false otherwise.
function source.getSourceById(id: string)
-> source: Source?
Get a Source by ID.
@param id
— The ID of the Source.
@return source
— The Source if found, nil otherwise.
function source.getSourceByName(name: string)
-> source: Source?
Get a Source by name.
@param name
— The name of the Source.
@return source
— The Source if found, nil otherwise.
function source.newFilter(name: string, filterType: FilterType, properties?: table)
-> filter: Filter
Create a new Filter.
@param name
— The name of the filter.
@param filterType
— The type of the filter.
@param properties
— Optional. The settings of the filter.
@return filter
— The new Filter.
function source.newSource(name: string, sourceType: SourceType, properties?: table, callback?: function)
-> source: Source
Create a new Source.
@param name
— The name of the Source.
@param sourceType
— The type of the Source.
@param properties
— Optional. The properties of the Source.
@param callback
— Optional. The callback to use the Source in.
@return source
— The new Source.
function source.useSourceByID(id: any, callback: function)
-> success: boolean
Use a Source found by ID in a callback to fetch the Source only once, optimizing performance.
@param callback
— The callback to use the Source in.
@return success
— True if the Source was used successfully, false otherwise.
function source.useSourceByName(name: any, callback: function)
-> success: boolean
Use a Source found by name in a callback to fetch the Source only once, optimizing performance.
@param callback
— The callback to use the Source in.
@return success
— True if the Source was used successfully, false otherwise.