Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
.openapi-generator
docs
lib
test
.openapi-generator-ignore
.php_cs
.travis.yml
README.md
composer.json
git_push.sh
phpunit.xml.dist

README.md

unwired

Geolocation, Geocoding and Maps

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 2.0.0
  • Package version: 2.0.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/unwiredlabs/unwired-php-client.git"
    }
  ],
  "require": {
    "unwiredlabs/unwired-php-client": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/unwired/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: token
$config = unwired\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = unwired\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

$apiInstance = new unwired\Api\BALANCEApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->balance();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BALANCEApi->balance: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to https://us1.unwiredlabs.com/v2

Class Method HTTP request Description
BALANCEApi balance GET /balance.php balance
GEOLOCATIONApi geolocation POST /process.php Geolocation
REVERSEApi reverse GET /reverse.php Reverse Geocoding
SEARCHApi search GET /search.php Forward Geocoding
TimezoneApi timezone GET /timezone.php timezone

Documentation For Models

Documentation For Authorization

token

  • Type: API key
  • API key parameter name: token
  • Location: URL query string

Author

You can’t perform that action at this time.