dant89/zoopla-api-php-client

A lightweight PHP client for the Zoopla API

0.0.2 2020-09-22 15:04 UTC

This package is auto-updated.

Last update: 2024-05-22 23:40:38 UTC


README

An unofficial PHP client for the Zoopla API

Latest Stable Version Github Issues

Installation

To install, run composer require dant89/zoopla-api-php-client in the root of your project or add dant89/zoopla-api-php-client to your composer.json.

"require": {
    "dant89/zoopla-api-php-client": REPLACE_WITH_VERSION
}

Zoopla developer API Documentation

To read more about how the Zoopla developer API functions, please read the official documentation.

Usage

Use your provided api key upon instantiation of this client. You can also specify the version and response output to be different from the defaults.

use Dant89\ZooplaApiClient\Client;

// Create base client
$zooplaClient = new Client(ZOOPLA_API_KEY);
// Select application client
$propertyClient = $zooplaClient->getHttpClient('property');
$properties = $propertyClient->getPropertyListings();

Tests

You can test your API key by running the PHPUnit tests included in this client.

Please note that tests will count as API call usages for the API key you specify.

PHPUnit tests:

  1. Add your apiKey to tests/Helper/ClientTestCase.php
  2. php vendor/phpunit/phpunit/phpunit tests

PHP CodeSniffer:

  • php vendor/squizlabs/php_codesniffer/bin/phpcs src --standard=PSR2 --severity=5 --extensions=php

PHP MessDetector

  • php vendor/phpmd/phpmd/src/bin/phpmd src text controversial,unusedcode,design

Contributions

Contributions to the client are welcome, to contribute please:

  1. Fork this repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a new pull request