wearerequired / harvest-api-php-client
PHP client library for the Harvest REST API.
Installs: 78 028
Dependents: 2
Suggesters: 0
Security: 0
Stars: 14
Watchers: 3
Forks: 13
Open Issues: 12
Requires
- php: ^7.1
- ext-json: *
- php-http/client-common: ^1.6 || ^2.0
- php-http/client-implementation: ^1.0
- php-http/discovery: ^1.0
- php-http/httplug: ^1.1 || ^2.0
- php-http/message-factory: ^1.0
- psr/http-message: ^1.0
Requires (Dev)
- dealerdirect/phpcodesniffer-composer-installer: ^0.6.2 || ^0.7.0
- guzzlehttp/psr7: ^1.0
- php-http/guzzle6-adapter: ^1.1 || ^2.0
- php-http/mock-client: ^1.2
- phpunit/phpunit: ^7.0 | ^8.0 | ^9.0
- slevomat/coding-standard: ^6.3
- squizlabs/php_codesniffer: ^3.3
- dev-master / 0.3.x-dev
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.1
- 0.1.0
- dev-dependabot/composer/dealerdirect/phpcodesniffer-composer-installer-tw-0.6.2or-tw-0.7.0or-tw-1.0.0
- dev-dependabot/github_actions/ramsey/composer-install-2
- dev-dependabot/github_actions/actions/checkout-3.1.0
- dev-dependabot/composer/slevomat/coding-standard-tw-6.3or-tw-7.0or-tw-8.0
- dev-dependabot/github_actions/codecov/codecov-action-3
- dev-dependabot/composer/phpstan/phpstan-tw-0.12.65or-tw-1.0.0
- dev-dependabot/composer/guzzlehttp/psr7-tw-1.0or-tw-2.0
This package is auto-updated.
Last update: 2024-11-12 06:47:22 UTC
README
An awesome object oriented wrapper for the Harvest REST API v2, written with and for modern PHP.
Install
Via Composer:
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.
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.
License
The MIT License (MIT). Please see license file for more information.