PlanningCenter class Null safety

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
read / write
clientId String?
read / write
clientSecret String?
read / write
hashCode int
The hash code for this object.
read-onlyinherited
oAuthCredentials PlanningCenterCredentials?
read / write
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

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 non-existent 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
read / write
instance PlanningCenter
read / write

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
'https://api.planningcenteronline.com/oauth/authorize'
mainEndpoint → const String
'https://api.planningcenteronline.com'
oAuthScopes → const List<String>
['calendar', 'check_ins', 'giving', 'groups', 'people', 'services']
tokenEndpoint → const String
'https://api.planningcenteronline.com/oauth/token'
uploadsEndpoint → const String
'https://upload.planningcenteronline.com/v2/files'