2017 © Pedro Peláez
 

library geohelper-api-client-php

PHP client for Geohelper API

image

dmamontov/geohelper-api-client-php

PHP client for Geohelper API

  • Thursday, October 6, 2016
  • by dmamontov
  • Repository
  • 2 Watchers
  • 2 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Geohelper API PHP client

PHP-client for Geohelper API., (*1)

Use API documentation, (*2)

Requirements

  • PHP 5.3 and above
  • PHP's cURL support

Install

1) Get composer, (*3)

2) Run into your project directory:, (*4)

composer require dmamontov/geohelper-api-client-php ~1.0.0

If you have not used composer before, include autoloader into your project., (*5)

require 'path/to/vendor/autoload.php';

Usage

Get countries

$client = new \Geohelper\ApiClient(
    'api_key'
);


try {
    $response = $client->countriesList();
} catch (\Geohelper\Exception\CurlException $e) {
    echo "Connection error: " . $e->getMessage();
}

if ($response->isSuccessful()) {
    $countries = isset($response['result']) ? $response['result'] : array();
    foreach ($countries as $country) {
        echo $country['name'];
    }
} else {
    echo sprintf(
        "Error: [HTTP-code %s] %s",
        $response->getStatusCode(),
        $response->getErrorMsg()
    );
}

The Versions

06/10 2016

dev-master

9999999-dev http://geohelper.info/

PHP client for Geohelper API

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

by Dmitry Mamontov

api rest geohelper

06/10 2016

1.0.0

1.0.0.0 http://geohelper.info/

PHP client for Geohelper API

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

by Dmitry Mamontov

api rest geohelper