linuskohl / org-locationiq
dev-master
2017-05-14 19:27 UTC
Requires
- guzzlehttp/guzzle: ^6.2
- netresearch/jsonmapper: ~1.1.1
This package is not auto-updated.
Last update: 2025-03-02 04:27:20 UTC
README
Unofficial Locationiq.org API client
Documentation available here.
Able to serialize responses to custom models via JSON mapper.
Requirements
- "guzzlehttp/guzzle": "^6.2"
- "netresearch/jsonmapper": "~1.1.1"
Install
Via Composer
$ composer require linuskohl/org-locationiq dev-master
License
The MIT License (MIT). Please see License File for more information.
Documentation
Class: \linuskohl\orgLocationIQ\Client
Visibility | Function |
---|---|
public | __construct(mixed $api_key=null) : void Constructor |
public | geocode(string $query, bool/boolean $cached=false) : \linuskohl\orgLocationIQ\models\Entry[]/null Geocode |
public | geocodeRaw(string $query, bool $cached=false) : mixed/null Geocode raw |
public | getBalance() : integer Get balance |
public | getBalanceRaw() : mixed/null Get balance |
public | setAPIKey(string $api_key) : void Set API key |
public | setCache(mixed $cache) : void Set cache |
public | setLanguage(string $language) : void Set language |
public | setShowDetails(boolean $details) : void Show address details |
protected static | generateCacheKey(string $url, mixed $parameters) : string Generate a key to cache the query |
protected | get(string $url, array/mixed[] $parameters=array(), bool/boolean $cached=true) : string Get data from API or cache |
protected | sendRequest(string $url, mixed[] $parameters) : string Send request to API |