The PHP client library for the Tuneup Technology App.
The PHP client library allows you to interact with the customers, tickets, inventory, and locations objects without needing to do the hard work of binding your calls and data to endpoints. Simply call an action such as Customer::create
and pass some data and let the library do the rest.
# Install the client library
composer require tuneuptechnology/tuneuptechnology-php
require 'vendor/autoload.php';
$client = new TuneupTechnology\Client(getenv("API_EMAIL"), getenv("API_KEY"));
$customer = $client->customers->create(
$data = [
"firstname" => "Jake",
"lastname" => "Peralta",
"email" => "[email protected]",
"phone" => "8015551234",
"user_id" => 1,
"notes" => "Believes he is a good detective.",
"location_id" => 2,
]
);
echo json_encode($customer);
Other examples can be found in the /examples
directory. Alter according to your needs.
[email protected] API_KEY=123... php create-customer.php
Up-to-date documentation can be found here.
# Install locally
composer install
# Lint project
composer lint
# Run tests (must be run with PHP 7)
[email protected] API_KEY=123... composer test
- Update the version variable in
Client.php
&composer.json
- Update CHANGELOG
- Create a GitHub tag with proper PHP version semantics (eg: v1.0.0)
- Packagist should automatically have the new version published once tagged in GitHub