2017 © Pedro Peláez
 

library harvest-api-php-client

PHP client library for the Harvest REST API.

image

wearerequired/harvest-api-php-client

PHP client library for the Harvest REST API.

  • Thursday, July 26, 2018
  • by wearerequired
  • Repository
  • 2 Watchers
  • 1 Stars
  • 48 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 3 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

PHP client library for the Harvest REST API

Latest Stable Version Latest Unstable Version Total Downloads CI codecov, (*1)

An awesome object oriented wrapper for the Harvest REST API v2, written with and for modern PHP., (*2)

Install

Via Composer:, (*3)

composer require wearerequired/harvest-api-php-client php-http/guzzle7-adapter

Why php-http/guzzle7-adapter? The library is decoupled from any HTTP messaging client with the help by HTTPlug., (*4)

Basic Usage

// Include Composer's autoloader.
require_once __DIR__ . '/vendor/autoload.php';

// Set up the client.
$client = new \Required\Harvest\Client();
$client->authenticate( 'account-id', 'token' );

// Do your API calls.
$currentUser = $client->currentUser()->show();

// Example request with auto paging.
$projects = $client->projects()->allWithAutoPagingIterator();
foreach ( $projects as $project ) {
    // Do something with $project. The iterator will automatically
    // fetch new entries if the end of a page is reached.
}

OAuth

This library does not include an OAuth 2.0 Client. We suggest to use the PHP League's OAuth 2.0 Client with our OAuth provider for Harvest., (*5)

License

The MIT License (MIT). Please see license file for more information., (*6)


, (*7)

a required open source product - let's get in touch, (*8)

The Versions

26/07 2018