kaweb/honeycomb

A library for interacting with the Inventory Hive API built using PHP 7

1.0.0 2019-04-26 10:31 UTC

README

A library for interacting with the Property Reporting API built using PHP

Please consult the API documentation for endpoint parameters.

Installation

composer

Execute the following command to get the latest version of the package:

composer require kaweb/honeycomb

Examples

Create a connection to the Inventory Hive API with your login details:

use Kaweb\Honeycomb\Application as Honeycomb;

$honeycomb = new Honeycomb([
	'username' => '',
	'password' => '',
	'client_id' => '',
	'client_secret' => '',
]);

Each object supports create, retrieve, update and delete RESTful actions

Access all user data

$honeycomb->users()->retrieve();

Access a specific user's data

$honeycomb->users()->retrieve(123);

Update a specific user's data

$honeycomb->users()->update(123 [
	'first_name' => 'Busy',
	'last_name' => 'Bee'
]);

Delete a specific user

$honeycomb->users()->delete(123);

Some objects have custom actions as defined in the API Documentation

Register a new company

$honeycomb->companies()->register([
	"email" =>            "example@propertyreporting.co.uk",
    "first_name" =>       "Buzzy",
    "last_name" =>        "Bee",
    "phone" =>            "123456789",
    "description" =>      "Landlord",
    "company_name" =>     "Inventory Hive",
]);