PcoCalendarResourceFolderQuery constructor

PcoCalendarResourceFolderQuery({
  1. bool includeResources = false,
  2. String? whereAncestry,
  3. String? whereCreatedAt,
  4. String? whereName,
  5. String? wherePathName,
  6. String? whereUpdatedAt,
  7. PcoCalendarResourceFolderFilter? filterBy,
  8. PcoCalendarResourceFolderOrder? orderBy,
  9. bool reverse = false,
  10. int perPage = 25,
  11. int pageOffset = 0,
  12. Map<String, String> extraParams = const {},
  13. List<PlanningCenterApiWhere>? where,
  14. Iterable<String> filter = const <String>[],
  15. String? order,
  16. Iterable<String> include = const <String>[],
})

Implementation

PcoCalendarResourceFolderQuery({
  /// include associated resources
  /// when true, adds `?include=resources` to url
  bool includeResources = false,

  /// Query by `ancestry`
  /// query on a specific ancestry, url example: ?where[ancestry]=string
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereAncestry,

  /// Query by `created_at`
  /// query on a specific created_at, url example: ?where[created_at]=2000-01-01T12:00:00Z
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereCreatedAt,

  /// 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 `path_name`
  /// query on a specific path_name, url example: ?where[path_name]=string
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? wherePathName,

  /// Query by `updated_at`
  /// query on a specific updated_at, url example: ?where[updated_at]=2000-01-01T12:00:00Z
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereUpdatedAt,
  PcoCalendarResourceFolderFilter? filterBy,
  PcoCalendarResourceFolderOrder? 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 (includeResources) include.add('resources');

  if (whereAncestry != null)
    where.add(PlanningCenterApiWhere.parse('ancestry', whereAncestry));
  if (whereCreatedAt != null)
    where.add(PlanningCenterApiWhere.parse('created_at', whereCreatedAt));
  if (whereName != null)
    where.add(PlanningCenterApiWhere.parse('name', whereName));
  if (wherePathName != null)
    where.add(PlanningCenterApiWhere.parse('path_name', wherePathName));
  if (whereUpdatedAt != null)
    where.add(PlanningCenterApiWhere.parse('updated_at', whereUpdatedAt));

  if (orderBy != null) order = orderString(orderBy, reverse: reverse);
}