burger-digital/blackbaud-php-sdk

该API管理成员信息以及相关实体,如地址、电话、电子邮件和备注。

dev-master 2022-09-26 00:58 UTC

This package is auto-updated.

Last update: 2024-09-19 23:35:29 UTC


README

该API管理成员信息以及相关实体,如地址、电话、电子邮件和备注。

安装与使用

要求

PHP 7.2 及以上。

Composer

要使用 Composer 安装绑定,请将以下内容添加到 composer.json

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/burger-digital/blackbaud-php-sdk.git"
    }
  ],
  "require": {
    "burger-digital/blackbaud-php-sdk": "*@dev"
  }
}

然后运行 composer install

手动安装

下载文件并包含 autoload.php

<?php
require_once('/path/to/Blackbaud Php Sdk/vendor/autoload.php');

入门指南

请遵循 安装程序,然后运行以下命令

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure API key authorization: apiKeyHeader
$config = BurgerDigital\BlackbaudPhpSdk\Configuration::getDefaultConfiguration()->setApiKey('Bb-Api-Subscription-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BurgerDigital\BlackbaudPhpSdk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Bb-Api-Subscription-Key', 'Bearer');

// Configure API key authorization: apiKeyQuery
$config = BurgerDigital\BlackbaudPhpSdk\Configuration::getDefaultConfiguration()->setApiKey('subscription-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BurgerDigital\BlackbaudPhpSdk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('subscription-key', 'Bearer');

// Configure OAuth2 access token for authorization: oauth2Blackbaud OAuth 2.0 ServiceAuthorizationCode
$config = BurgerDigital\BlackbaudPhpSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Configure OAuth2 access token for authorization: oauth2Blackbaud OAuth 2.0 ServiceImplicit
$config = BurgerDigital\BlackbaudPhpSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new BurgerDigital\BlackbaudPhpSdk\Api\ActionApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$action_add = new \BurgerDigital\BlackbaudPhpSdk\Model\ActionAdd(); // \BurgerDigital\BlackbaudPhpSdk\Model\ActionAdd | An object that represents the action to create.

try {
    $result = $apiInstance->createAction($action_add);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ActionApi->createAction: ', $e->getMessage(), PHP_EOL;
}

API 端点

所有 URI 都相对于 https://api.sky.blackbaud.com/constituent/v1

模型

授权

apiKeyHeader

  • 类型: API密钥
  • API密钥参数名: Bb-Api-Subscription-Key
  • 位置: HTTP头部

apiKeyQuery

  • 类型: API密钥
  • API密钥参数名: subscription-key
  • 位置: URL查询字符串

oauth2Blackbaud OAuth 2.0 ServiceAuthorizationCode

  • 类型: OAuth
  • 流程: accessCode
  • 授权URL: https://oauth2.sky.blackbaud.com/authorization
  • 作用域: 无

oauth2Blackbaud OAuth 2.0 ServiceImplicit

  • 类型: OAuth
  • 流程: implicit
  • 授权URL: https://oauth2.sky.blackbaud.com/authorization
  • 作用域: 无

测试

运行测试,使用

composer install
vendor/bin/phpunit

作者

关于此包

此PHP包是由OpenAPI Generator项目自动生成的

  • API版本: 1.0
    • 包版本: 1.0.0
  • 构建包: org.openapitools.codegen.languages.PhpClientCodegen