PcoCalendarEventQuery class Null safety

Creates a PcoCalendarEventQuery object

Possible Includes

(translates to url parameter: ?include=a,b)

Related data may be included by marking desired includeSomething variables as true:

  • includeAttachments: include associated attachments
  • includeOwner: include associated owner
  • includeTags: include associated tags
  • includeAllRelated: include all related objects

Alternatively, you may pass a list of strings to the include argument.

e.g. PcoCalendarEventQuery(includes: ['a', 'b'])

Possible Query Fields

(translates to url parameters like ?where[field_name]=value or ?where[field_name][gt|lt]=value)

PcoCalendarEvent objects can be requested with one or more of the following criteria:

  • whereApprovalStatus: query on a specific approval_status, example: ?whereapproval_status=string
  • whereCreatedAt: query on a specific created_at, example: ?wherecreated_at=2000-01-01T12:00:00Z
  • whereName: query on a specific name, example: ?wherename=string
  • wherePercentApproved: query on a specific percent_approved, example: ?wherepercent_approved=1
  • wherePercentRejected: query on a specific percent_rejected, example: ?wherepercent_rejected=1
  • whereUpdatedAt: query on a specific updated_at, example: ?whereupdated_at=2000-01-01T12:00:00Z
  • whereVisibleInChurchCenter: query on a specific visible_in_church_center, example: ?wherevisible_in_church_center=true

For each, you may specify a prefix of <, <=, >, >= to query by comparisons

Alternatively, you may pass a List of PlanningCenterApiWhere objects to the where field e.g. PlanningCenterApiQuery(where: [PlanningCenterApiWhere('created_at', '2021-01-01', 'gte')]) See documentation for PlanningCenterApiQuery for more details about the where field.

Extra Params

Many API queries accept extra parameters too. The extraParams mapping will translate directly to url parameters.

Inheritance

Constructors

PcoCalendarEventQuery({bool includeAttachments = false, bool includeOwner = false, bool includeTags = false, bool includeAllRelated = false, String? whereApprovalStatus, String? whereCreatedAt, String? whereName, String? wherePercentApproved, String? wherePercentRejected, String? whereUpdatedAt, String? whereVisibleInChurchCenter, PcoCalendarEventFilter? filterBy, 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>[]})

Properties

asApiMap Map<String, dynamic>
read-onlyinherited
asMap Map<String, dynamic>
read-onlyinherited
extraParams Map<String, String>
extraParams allows you to specify arbitrary url parameters to the API.
read / writeinherited
filter Set<String>
filter should be something like future, past, after, before, no_dates
read / writeinherited
getAll bool
Set this flag to automatically retrieve all possible items for this query
read / writeinherited
hashCode int
The hash code for this object.
read-onlyinherited
include Set<String>
include specifies which related items should be included.
read / writeinherited
order String?
order can usually be one of created_at, updated_at, title, sort_date, but may be others.
read / writeinherited
pageOffset int
read / writeinherited
perPage int
Pagination defaults to 25, maximum allowed seems to be 100
finalinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
where List<PlanningCenterApiWhere>
where should be a map of query parameters.
read / writeinherited

Methods

copy() PlanningCenterApiQuery
returns a copy of this query as a new object this method works because Strings and ints are always copied by value
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited
withOffset(int offset) PlanningCenterApiQuery
returns a new query only modifying the offset value
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

filterString(PcoCalendarEventFilter filter) String
orderString(PcoCalendarEventOrder order, {bool reverse = false}) String