blackbaud/onsdk

PHP sdk for connecting to on api

1.0.8 2019-08-23 13:28 UTC

This package is auto-updated.

Last update: 2024-03-23 23:39:13 UTC


README

Build Status

Features

  • Provides easy-to-use HTTP clients for all supported ON API methods and authentication protocols.
  • Currently built on Curl
  • Provides authentication and simple token management

Getting Started

  1. Have a Web Service API user – Before you begin, you need to sign up for the onSDK and have a Manager account created.
  2. Minimum requirements – To run the SDK, your system will need to meet the [minimum requirements][docs-requirements], including having PHP >= 5.6 compiled with the cURL extension and cURL 7.16.2+ compiled with a TLS backend (e.g., NSS or OpenSSL).
  3. Install the SDK – Using Composer is the recommended way to install the Blackbaud onSDK for PHP. The SDK is available via Packagist under the blackbaud/onsdk package.

Quick Examples

Authenticate with API

<?php
// Require the Composer autoloader.
require 'vendor/autoload.php';

use Blackbaud\onSDK\onApiClient;

// Instantiate a Blackbaud Client.
$bb = new onApiClient('SchoolUrl','Username','Password');

Get User Info

<?php
// get info about the current user account using the SDK.
try {
    $user = $bb->get_current_user();
    print_r($user);
} catch (Exception $e) {
    echo "There was an error getting user info.\n";
}