Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 1.56 KB

README.md

File metadata and controls

32 lines (23 loc) · 1.56 KB

Onfleet-PHP

Onfleet-PHP is an API wrapper for Onfleet's APIs.

Installation

Include Onfleet.php into your .php file.

include "Onfleet.php";

Usage

You can create an instance of the API wrapper:

$config = array("api_name" => "Replace with Name", "api_key" => "Replace with key");
$onfleet = new Onfleet($config);

Example to Create Administrator:

$params = array("name" => "Stuart Little", "email" => "your@email.com", "phone" => "6615991234");
$response = $onfleet->admin_create($params);

Example to List Tasks:

$params = array("state" => 0);
$response = $onfleet->tasks($params);

Contributing

  1. Fork it ( https://github.com/billybateman/Onfleet-PHP/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request