getAllFromMessageGroup static method

Future<PcoCollection<PcoPeopleApp>> getAllFromMessageGroup(
  1. String messageGroupId, {
  2. String? id,
  3. PcoPeopleAppQuery? query,
})

Will get a PcoCollection containing ALL PcoPeopleApp objects (expecting many) using a path like this: /people/v2/message_groups/$messageGroupId/app

Additional options may be specified by using the query argument, but some query options are also available as boolean flags in this function call too.

This function forces the query.getAll to be true.

Implementation

static Future<PcoCollection<PcoPeopleApp>> getAllFromMessageGroup(
  String messageGroupId, {
  String? id,
  PcoPeopleAppQuery? query,
}) async {
  query ??= PcoPeopleAppQuery();
  query.getAll = true;

  var url = '/people/v2/message_groups/$messageGroupId/app';
  if (id != null) url += '/$id';
  return PcoCollection.fromApiCall<PcoPeopleApp>(url,
      query: query, apiVersion: kApiVersion);
}