Skip to content

Galantom/galantom-api-php

Repository files navigation

galantom-api-php

Latest Version on Packagist Latest Stable Version Latest Unstable Version

Software License Build Status SensioLabsInsight Quality Score StyleCI Total Downloads

Official PHP Client Library for the Galantom Web API

Installation

Prerequisites

  • PHP version 5.6 or 7.0

Install Package

Add SendGrid to your composer.json file. If you are not using Composer, you should be. It's an excellent way to manage dependencies in your PHP application.

{
  "require": {
    "galantom/galantom-api-php": "^1.0"
  }
}

Quick Start

<?php
// If you are using Composer (recommended)
require 'vendor/autoload.php';

$galantom_api_token = getenv('GALANTOM_API_TOKEN');

use GalantomApi\GalantomClient;
$client = GalantomClient::factory(
    ['api_token' => $galantom_api_token]
);

// Get list of donations
/** @var \GuzzleHttp\Command\Result $response */
$response = $client->getPageDonations(['id' => 327]);

if ($response['response']['code'] !== '200') {
    die($response['response']['message']);
}

foreach ($response['donations'] as $donation) {
    echo $donation['id'].'|';
}

About

Official PHP Client Library for the Galantom Web API

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages