getAllFromTeam static method
Future<PcoCollection<PcoServicesPerson> >
getAllFromTeam(
- String teamId, {
- String? id,
- PcoServicesPersonQuery? query,
- bool includeTeamLeaders = false,
Will get a PcoCollection
containing ALL PcoServicesPerson objects (expecting many)
using a path like this: /services/v2/teams/$teamId/people
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<PcoServicesPerson>> getAllFromTeam(
String teamId, {
String? id,
PcoServicesPersonQuery? query,
bool includeTeamLeaders = false,
}) async {
query ??= PcoServicesPersonQuery();
query.getAll = true;
if (includeTeamLeaders) query.include.add('team_leaders');
var url = '/services/v2/teams/$teamId/people';
if (id != null) url += '/$id';
return PcoCollection.fromApiCall<PcoServicesPerson>(url,
query: query, apiVersion: kApiVersion);
}