PcoGroupsEventQuery constructor
PcoGroupsEventQuery({
- bool includeGroup = false,
- bool includeLocation = false,
- bool includeAllRelated = false,
- String? whereEndsAt,
- String? whereName,
- String? whereStartsAt,
- PcoGroupsEventFilter? filterBy,
- PcoGroupsEventOrder? 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
PcoGroupsEventQuery({
/// include associated group
/// when true, adds `?include=group` to url
bool includeGroup = false,
/// include associated location
/// when true, adds `?include=location` to url
bool includeLocation = false,
/// when true, adds `?include=group,location` to url parameters
bool includeAllRelated = false,
/// Query by `ends_at`
/// query on a specific ends_at, url example: ?where[ends_at]=2000-01-01T12:00:00Z
/// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
String? whereEndsAt,
/// Query by `name`
/// query on a specific name, url example: ?where[name]=string
/// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
String? whereName,
/// Query by `starts_at`
/// query on a specific starts_at, url example: ?where[starts_at]=2000-01-01T12:00:00Z
/// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
String? whereStartsAt,
PcoGroupsEventFilter? filterBy,
PcoGroupsEventOrder? 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 (includeAllRelated || includeGroup) include.add('group');
if (includeAllRelated || includeLocation) include.add('location');
if (whereEndsAt != null)
where.add(PlanningCenterApiWhere.parse('ends_at', whereEndsAt));
if (whereName != null)
where.add(PlanningCenterApiWhere.parse('name', whereName));
if (whereStartsAt != null)
where.add(PlanningCenterApiWhere.parse('starts_at', whereStartsAt));
if (orderBy != null) order = orderString(orderBy, reverse: reverse);
}