findShadersByPlaylistId method
Returns a FindShadersResponse
with a list of shaders.
for the playlist playlistId
from
: A 0 based index for results returnednum
: The total number of results
Upon success a list of Shader
objects is provided as well as the overall
number of records in total (not the number of shaders in the list, the
number of total results). The error is set to null
In case of error a ResponseError
is set and no Shader
list is provided
Implementation
@override
Future<FindShadersResponse> findShadersByPlaylistId(String playlistId,
{int? from, int? num}) {
return catchSqlError<FindShadersResponse>(
store.shaderDao
.findByPlaylist(playlistId,
from: from, num: num ?? options.playlistShaderCount)
.then((results) => FindShadersResponse(
shaders: results
.map((r) => FindShaderResponse(shader: r))
.toList())),
(sqle) => FindShadersResponse(
error: toResponseError(sqle,
context: contextPlaylist, target: playlistId)),
options);
}