where property

List<PlanningCenterApiWhere> where
read / write

where should be a map of query parameters.

Each class has a static field named canQuery with the list of fields that can be queried. Queryable fields are also described in the class documentation.

The PlanningCenter API supports url params like this:

  • ?where[field_name]=value
  • ?where[field_name][gt|lt|gte|lte]=value

However, this library uses a different format for the where component of a query. Use the queryable field name as a key and append a comparison suffix (=, <, >).

The where map will be converted to url parameters like the following:

  • { 'created_at': '<2022-01-01' } -> ?where[created_at][lt]=2022-01-01 (finds items before that date)
  • { 'created_at': '>=2022-01-01' } -> ?where[created_at][gte]=2022-01-01 (finds items on or after that date)
  • { 'created_at': '=2022-01-01' } -> ?where[created_at]=2022-01-01 (finds items on that date)
  • { 'created_at': '2022-01-01' } -> same as using =


List<PlanningCenterApiWhere> where = [];