e-monsite/hello-asso-php-client

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

This package is auto-updated.

Last update: 2024-05-21 21:28:45 UTC


README

www.helloasso.com Api specifications

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

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

Then run composer install

Manual Installation

Download the files and include autoload.php:

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

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?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;
}
?>

Documentation for API Endpoints

All URIs are relative to https://api.helloasso-rc.com

Class Method HTTP request Description
AuthApi auhtorize POST /oauth2/token Authorization request
OrganizationsApi createEvent POST /v5/organizations/{organization_slug}/forms/events/action/quick-create
OrganizationsApi getEventTypes GET /v5/values/form/event/types
PublicApi getOrganizationCampaigns GET /v3/public/organizations/{organization_slug}/campaigns.json

Documentation For Models

Documentation For Authorization

OAuth 2 JWT token with custom grant type

apiBearer

  • Type: HTTP bearer authentication

Author