getAllAttachments method
Future<PcoCollection<PcoServicesAttachment> >
getAllAttachments(
- {PcoServicesAttachmentQuery? query}
Will get a collection of PcoServicesAttachment objects (expecting many)
using a path like this: https://api.planningcenteronline.com/services/v2/service_types/1/plans/1/all_attachments
Available Query Filters:
-
attachable_type
filter attachments by their attachable_type as specified in theattachable_type
parameter. Default:["ServiceType", "Plan", "Item", "Media", "Song", "Arrangement", "Key"]
. e.g.?filter=attachable_type&attachable_type=Plan,ServiceType
-
extensions
filter to attachments with a file extension specified in theextensions
parameter. e.g.?filter=extensions&extensions=pdf,txt
Implementation
Future<PcoCollection<PcoServicesAttachment>> getAllAttachments(
{PcoServicesAttachmentQuery? query}) async {
query ??= PcoServicesAttachmentQuery();
var url = '$apiEndpoint/all_attachments';
return PcoCollection.fromApiCall<PcoServicesAttachment>(url,
query: query, apiVersion: apiVersion);
}