fw4 / omnicasa-api
PHP library for implementing the Omnicasa API
v1.3.1
2026-10-07 11:32 UTC
Requires
- php: ^8.0
- guzzlehttp/guzzle: ~6.0|~7.0
- ocramius/package-versions: ^2.1
Requires (Dev)
- phpunit/phpunit: ^8.4|^9.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-master
- v1.3.1
- v1.3.0
- v1.2.4
- v1.2.3
- v1.2.2
- v1.2.1
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-bugfix/user-list-pagination
- dev-develop
- dev-feature/pagination
- dev-feature/request-fields
- dev-bugfix/date-parsing
- dev-feature/omnicasa-version
- dev-bugfix/buffer-dynamic-property
- dev-feature/php-8.2
This package is auto-updated.
Last update: 2026-10-07 11:33:10 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.
To fetch one page explicitly (page numbers start at 1):
$page = $client->getSiteList()->page(page: 1, perPage: 30); echo count($page); // Number of sites on this page echo $page->getPage(); // 1 echo $page->getPageSize(); // 30 echo $page->getTotalCount(); // Number of sites across all pages echo $page->getPageCount(); // Total number of pages foreach ($page as $site) echo $site->id;