Search by

bmlt-enabled / geo-api-php-client

pjaudiomv

Cached geocoding and timezone lookups for BMLT-enabled applications. Every endpoint requires an API key (Settings → API Keys) sent as a Bearer token.

Package info

github.com/bmlt-enabled/geo-api-php-client

Homepage

pkg:composer/bmlt-enabled/geo-api-php-client

Statistics

Installs: 61

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.3 2026-10-25 19:39 UTC

This package is auto-updated.

Last update: 2026-11-01 22:47:57 UTC


README

Cached geocoding and timezone lookups for BMLT-enabled applications. Every endpoint requires an API key (Settings → API Keys) sent as a Bearer token.

Installation & Usage

Requirements

PHP 8.1 and later.

Composer

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

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

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

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



// Configure Bearer authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\GeocodingApi(
    // 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
);
$application = 'application_example'; // string | Your application identifier (used for analytics).
$search = 'search_example'; // string | Address or place to geocode.
$referrer = 'referrer_example'; // string | URL of the requesting page (region detection + analytics).
$language = 'language_example'; // string | BCP-47 language code (default: en).
$region = 'region_example'; // string | Region bias as a ccTLD (e.g. \"fr\", \"ca\"). Overrides the region inferred from the referrer domain — useful when the referrer has no country TLD.
$north = 3.4; // float | Viewport north bound (decimal degrees).
$south = 3.4; // float | Viewport south bound (decimal degrees).
$east = 3.4; // float | Viewport east bound (decimal degrees).
$west = 3.4; // float | Viewport west bound (decimal degrees).

try {
    $result = $apiInstance->geocode($application, $search, $referrer, $language, $region, $north, $south, $east, $west);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GeocodingApi->geocode: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://geo.aws.bmlt.app

Class Method HTTP request Description
GeocodingApi geocode GET /api/geocode Geocode an address or place
TimezoneApi timezone GET /api/timezone Look up the timezone for a location

Models

Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

admin@bmlt.app

About this package

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

  • API version: 1.0.0
    • Package version: 1.0.4
    • Generator version: 7.27.0-SNAPSHOT
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen