PlanningCenter class

PlanningCenter

example:

/// will return a singular [PlanningCenter] instance
var pc1 = PlanningCenter.init(appId, secret);
var pc2 = PlanningCenter.instance;
assert(pc1 == pc2);

This module doesn't support uploads yet.

Also, the only API version that works with all PCO applications is 2018-08-01 However, this package attempts to use the best version available for each application That's why the global api object here allows a version to be specified in the call function

Properties

apiCanCall Future
used for throttling requests
getter/setter pair
clientId String?
getter/setter pair
clientSecret String?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
oAuthCredentials PlanningCenterCredentials?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

call(String endpoint, {String verb = 'get', Object? data, PlanningCenterApiQuery? query, String apiVersion = ''}) Future<PlanningCenterApiResponse<PlanningCenterApiData>>
Planning Center publishes their API documentation here: https://developer.planning.center/docs/#/overview/
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
upload(String filename) Future<PlanningCenterApiResponse<PlanningCenterApiData>>
Handle Uploads

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

initialized bool
getter/setter pair
instance PlanningCenter
getter/setter pair

Static Methods

authorize(String clientId, String clientSecret, List<String> scopes, {String redirectUri = 'http://localhost:65738/callback', PlanningCenterAuthRedirector? redirector}) Future<bool>
Use OAuth2 to authorize Scopes should be one or more of the following: api, calendar, check_ins, giving, groups, people, services, webhooks ... for some reason, the webhooks scope gives an error
init(String appId, String secret) PlanningCenter
initialize with an appId and a secret for basic authentication
initWithCredentials(String clientId, String clientSecret, PlanningCenterCredentials credentials) PlanningCenter
initialize with an already configured client.

Constants

authEndpoint → const String
mainEndpoint → const String
oAuthScopes → const List<String>
tokenEndpoint → const String
uploadsEndpoint → const String