getPlaybackProgress method
- PlaybackProgressItemType? type,
- String? startAt,
- String? endAt,
- RequestPagination? pagination,
Whenever a scrobble is paused, the playback progress is saved.
Use this progress to sync up playback across different media centers or apps. For example, you can start watching a movie in a media center, stop it, then resume on your tablet from the same spot. Each item will have the progress percentage between 0 and 100.
You can optionally specify a type to only get movies or episodes.
By default, all results will be returned. Pagination is optional and can be used for something like an "on deck" feature, or if you only need a limited data set.
type
- Possible values: movies , episodes .
startAt
- Starting date. Example: 2016-06-01T00:00:00.000Z
endAt
- Starting date. Example: 2016-06-01T00:00:00.000Z
🔒 OAuth Required 📄 Pagination Optional
Implementation
Future<List<PlaybackProgress>> getPlaybackProgress(
{PlaybackProgressItemType? type,
String? startAt,
String? endAt,
RequestPagination? pagination}) async {
Map<String, dynamic>? params;
if (startAt != null) {
params = {};
params["start_at"] = startAt;
}
if (endAt != null) {
params = params ?? {};
params["end_at"] = endAt;
}
final request = type != null ? type.value : "";
return await _manager._authenticatedGetList<PlaybackProgress>(
"sync/last_activities$request",
queryParamameters: params);
}