faustbrian/hiveage-php-client

A Hiveage Client for PHP

dev-master / 1.0.x-dev 2018-02-16 07:52 UTC

README

Build Status PHP from Packagist Latest Version License

Installation

Require this package, with Composer, in the root directory of your project.

$ composer require faustbrian/hiveage-php-client

Usage

<?php

use BrianFaust\Config;

$client = new BrianFaust\Hiveage\Client();

$client->setConfig(new Config([
    'username' => 'YOUR_USERNAME',
    'apiKey' => 'YOUR_APIKEY',
]));

$response = $client->api('Network')->all();
$response = $client->api('Network')->retrieve('hash_key');
$response = $client->api('Network')->destroy('hash_key');
$response = $client->api('Network')->invoiceActivities('hash_key');
$response = $client->api('Network')->estimateActivities('hash_key');
$response = $client->api('Network')->recurringInvoicesActivities('hash_key');

$response = $client->api('Network')->create([
    "first_name" => "John",
    "last_name" => "Doe",
    "business_email" => "email@example.com",
    "currency" => "USD",
    "address" => "941 Example Ave. #5 ",
    "city" => "Long Beach",
    "state_name" => "CA",
    "zip_code" => "90813",
    "country" => "United States",
    "phone" => "562-556-5555",
    "fax" =>"562-381-5555",
    "website_url" => "http://example.hiveage.com",
    "category" => "individual",
    "language" => "en-us"
]);

$response = $client->api('Network')->update('hash_key', [
    "first_name" => "John",
    "last_name" => "Doe",
    "business_email" => "email@example.com",
    "currency" => "USD",
    "address" => "941 Example Ave. #5 ",
    "city" => "Long Beach",
    "state_name" => "CA",
    "zip_code" => "90813",
    "country" => "United States",
    "phone" => "562-556-5555",
    "fax" =>"562-381-5555",
    "website_url" => "http://example.hiveage.com",
    "category" => "individual",
    "language" => "en-us"
]);

Testing

$ phpunit

Security

If you discover a security vulnerability within this package, please send an e-mail to hello@brianfaust.me. All security vulnerabilities will be promptly addressed.

Credits

License

MIT © Brian Faust