PcoServicesMediaQuery constructor
PcoServicesMediaQuery({
- bool includeAttachments = false,
- String? whereCreatorName,
- String? whereId,
- String? whereThemes,
- String? whereTitle,
- PcoServicesMediaFilter? filterBy,
- PcoServicesMediaOrder? orderBy,
- bool reverse = false,
- int perPage = 25,
- int pageOffset = 0,
- Map<
String, String> extraParams = const {}, - List<
PlanningCenterApiWhere> ? where, - Iterable<
String> filter = const <String>[], - String? order,
- Iterable<
String> include = const <String>[],
Implementation
PcoServicesMediaQuery({
/// include associated attachments
/// when true, adds `?include=attachments` to url
bool includeAttachments = false,
/// Query by `creator_name`
/// query on a specific creator_name, url example: ?where[creator_name]=string
/// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
String? whereCreatorName,
/// Query by `id`
/// query on a specific id, url example: ?where[id]=primary_key
/// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
String? whereId,
/// Query by `themes`
/// query on a specific themes, url example: ?where[themes]=string
/// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
String? whereThemes,
/// Query by `title`
/// query on a specific title, url example: ?where[title]=string
/// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
String? whereTitle,
PcoServicesMediaFilter? filterBy,
PcoServicesMediaOrder? orderBy,
/// reverse the ordering
bool reverse = false,
// direct access to super class params
super.perPage,
super.pageOffset,
super.extraParams,
super.where,
super.filter,
super.order,
super.include,
}) : super() {
if (filterBy != null) filter.add(filterString(filterBy));
if (includeAttachments) include.add('attachments');
if (whereCreatorName != null)
where.add(PlanningCenterApiWhere.parse('creator_name', whereCreatorName));
if (whereId != null) where.add(PlanningCenterApiWhere.parse('id', whereId));
if (whereThemes != null)
where.add(PlanningCenterApiWhere.parse('themes', whereThemes));
if (whereTitle != null)
where.add(PlanningCenterApiWhere.parse('title', whereTitle));
if (orderBy != null) order = orderString(orderBy, reverse: reverse);
}