fw4/omnicasa-api

PHP library for implementing the Omnicasa API

v1.2.1 2024-04-25 07:33 UTC

README

PHP client for the Onmicasa API.

Installation

composer require fw4/omnicasa-api

Usage

$client = new \Omnicasa\Omnicasa('name', 'password');
$properties = $client->getPropertyList([
    'CountryIDs' => [10]
]);
foreach ($properties as $property) var_dump($property->id);

It's also possible to construct requests through objects:

$request = new \Omnicasa\Request\Property\GetPropertyListRequest();
$request->countryIDs = [10];
$request->zips = [1000, 3000];

$client = new \Omnicasa\Omnicasa('name', 'password');
$properties = $client->getPropertyList($request);
foreach ($properties as $property) var_dump($property->id);

Properties on both requests and responses are implemented case insensitively. For more information about available request parameters and response properties, refer to the official API spec.

Pagination

When iterating over a response containing multiple objects, sequential pagination requests will automatically be sent in the background.