smartoysters/farmopsx-api

FarmOpsX API client for PHP

dev-main 2024-09-10 00:41 UTC

This package is auto-updated.

Last update: 2024-11-10 00:58:59 UTC


README

Build Status

This package provides a complete framework agnostic FarmOpsX API client library for PHP.

Feel free to drop me a message at james.rickard@smartoysters.com or tweet me at @frodosghost.

Documentation

No documentation, just yet.

Installation

You can install the package via composer require command:

composer require smartoysters/farmopsx-api

Or simply add it to your composer.json dependences and run composer update:

"require": {
    "smartoysters/farmopsx-api": "^1.0"
}

Usage

$token = 'xxxxxxxxxxxxxxxxxxxxxxxxxxx';

$farmopsx = new \SmartOysters\FarmOpsX\FarmOpsX($token);

Guzzle Client Options

The options value in the constructor allows configuration for the Guzzle Client to set any number of default request options.

$options = [
    'timeout'         => 0,
    'allow_redirects' => false,
    'proxy'           => '192.168.16.1:10'
];

$farmopsx = new \SmartOysters\FarmOpsX\FarmOpsX($token, $uri, $options);