e-monsite/hello-asso-php-client

dev-master 2019-10-21 09:58 UTC

This package is auto-updated.

Last update: 2024-09-21 22:07:22 UTC


README

www.helloasso.com Api规范

此PHP包由Swagger Codegen项目自动生成

  • API版本: 1.0.0
  • 构建包: io.swagger.codegen.v3.generators.php.PhpClientCodegen

要求

PHP 5.5及更高版本

安装与使用

Composer

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

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/e-monsite/hello-asso-php-client.git"
    }
  ],
  "require": {
    "e-monsite/hello-asso-php-client": "*@dev"
  }
}

然后运行composer install

手动安装

下载文件并包含autoload.php

    require_once('/path/to/hello-asso-php-client/vendor/autoload.php');

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门

请按照安装过程操作,然后运行以下命令

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

$apiInstance = new HelloAsso\Api\HelloAsso\AuthApi(
    // 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()
);
$client_id = "client_id_example"; // string | 
$client_secret = "client_secret_example"; // string | 
$grant_type = "grant_type_example"; // string | 
$refresh_token = "refresh_token_example"; // string | 
$user_email = "user_email_example"; // string | 
$user_first_name = "user_first_name_example"; // string | 
$user_last_name = "user_last_name_example"; // string | 
$organization_name = "organization_name_example"; // string | 
$organization_address = "organization_address_example"; // string | 
$organization_zipcode = "organization_zipcode_example"; // string | 
$organization_city = "organization_city_example"; // string | 
$organization_phone = "organization_phone_example"; // string | 
$organization_type = "organization_type_example"; // string | 
$organization_website = "organization_website_example"; // string | 

try {
    $result = $apiInstance->auhtorize($client_id, $client_secret, $grant_type, $refresh_token, $user_email, $user_first_name, $user_last_name, $organization_name, $organization_address, $organization_zipcode, $organization_city, $organization_phone, $organization_type, $organization_website);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AuthApi->auhtorize: ', $e->getMessage(), PHP_EOL;
}
?>

API端点文档

所有URI都是相对于 https://api.helloasso-rc.com

模型文档

授权文档

OAuth 2 JWT令牌与自定义授权类型

apiBearer

  • 类型: HTTP bearer身份验证

作者