getSingle static method
Future<PcoPeopleForm?>
getSingle(
- String id, {
- PcoPeopleFormQuery? query,
- bool includeCampus = false,
Will get a single PcoPeopleForm
object
using a path like this: /people/v2/forms/[id]
Available Query Filters:
archived
closed
not_archived
open
recently_viewed
with_recoverable
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.
Implementation
static Future<PcoPeopleForm?> getSingle(
String id, {
PcoPeopleFormQuery? query,
bool includeCampus = false,
}) async {
query ??= PcoPeopleFormQuery();
if (includeCampus) query.include.add('campus');
var url = '/people/v2/forms/$id';
var retval = await PcoCollection.fromApiCall<PcoPeopleForm>(url,
query: query, apiVersion: kApiVersion);
return retval.items.isEmpty ? null : retval.items.first;
}