PcoPeopleMessageGroupQuery class

Creates a PcoPeopleMessageGroupQuery object

Possible Includes

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

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

  • includeApp: include associated app
  • includeFrom: include associated from
  • includeMessages: include associated messages
  • includeAllRelated: include all related objects

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

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

Possible Query Fields

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

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

  • whereCreatedAt: query on a specific created_at, example: ?wherecreated_at=2000-01-01T12:00:00Z
  • whereFromAddress: query on a specific from_address, example: ?wherefrom_address=string
  • whereMessageCount: query on a specific message_count, example: ?wheremessage_count=1
  • whereMessageType: query on a specific message_type, example: ?wheremessage_type=string
  • whereSubject: query on a specific subject, example: ?wheresubject=string
  • whereSystemMessage: query on a specific system_message, example: ?wheresystem_message=true
  • whereUuid: query on a specific uuid, example: ?whereuuid=string

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.

Possible Ordering

(translates to url parameter: ?order=-updated_at)

Results can be ordered by setting orderBy to an appropriate enum value:

  • PcoPeopleMessageGroupOrder.createdAt : will order by created_at
  • PcoPeopleMessageGroupOrder.fromAddress : will order by from_address
  • PcoPeopleMessageGroupOrder.messageCount : will order by message_count
  • PcoPeopleMessageGroupOrder.messageType : will order by message_type
  • PcoPeopleMessageGroupOrder.subject : will order by subject
  • PcoPeopleMessageGroupOrder.systemMessage : will order by system_message
  • PcoPeopleMessageGroupOrder.uuid : will order by uuid

To reverse the order, set reverse to true.

Alternatively, you may pass a string to the order field directly (a prefix of - reverses the order). e.g. PlanningCenterApiQuery(order: '-updated_at')

Extra Params

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

Inheritance

Constructors

PcoPeopleMessageGroupQuery({bool includeApp = false, bool includeFrom = false, bool includeMessages = false, bool includeAllRelated = false, String? whereCreatedAt, String? whereFromAddress, String? whereMessageCount, String? whereMessageType, String? whereSubject, String? whereSystemMessage, String? whereUuid, PcoPeopleMessageGroupOrder? 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>[]})

Properties

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

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 nonexistent 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(PcoPeopleMessageGroupFilter filter) String
orderString(PcoPeopleMessageGroupOrder order, {bool reverse = false}) String