Blackbaud SKY API
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Downloads
Component created
Component changed
Component body
This module is for connecting via OAuth to the Blackbaud SKY API. That is all this does, but it gives you a method and a class to work with to call the API to get results.
Drupal 8
The alpha version is a fully functioning version. I only marked it alpha because I need to do more dependency injection of the config. Right now I am procedurally loading all the config. That is fine and it works, but should do this the D8 way. See this issue: #2928053: [meta] To Do's
Drupal 7
This module require Composer Manager & Xautoload (version >5.0).
After you install these module and configure Composer Manager, then run this in the composer directory:
composer require guzzlehttp/guzzle
How to Use
Once you setup and authorize the module here: /admin/config/services/blackbaud
In your files do this:
use Drupallackbaud_sky_apiBlackbaudAPI;
function whatever() {
$bb = new BlackbaudAPI();
// This will return an object on success or NULL if it fails
$api = $bb->callAPI('string of url endpoint defined here: https://developer.sky.blackbaud.com/docs/services/');
}
Extending the Class
You can do this if you need to add more magic, etc
namespace DrupalYOURMODULE;
use Drupallackbaud_sky_apiBlackbaudAPI;
YOURCLASS extends BlackbaudAPI {
// codez
}
D7 Variable
I added a variable called blackbaud_sky_api_quota_reached to basically handle 403 based responses for daily quote limit reached (typically 25,000 on free accounts). This is useful in a batch situation when you need to exit early. It also sends a watchdog message telling when you can hit the API again.