liamclaridge444 / php-mapbox-api
A PHP wrapper for the Mapbox API
v0.1
2023-12-18 14:42 UTC
Requires
- php: ^7.2.5 || ^8.0
- ext-json: *
- php-http/cache-plugin: ^1.7.1
- php-http/client-common: ^2.3
- php-http/discovery: ^1.12
- php-http/httplug: ^2.2
- php-http/multipart-stream-builder: ^1.1.2
- psr/cache: ^1.0|^2.0|^3.0
- psr/http-client-implementation: ^1.0
- psr/http-factory-implementation: ^1.0
- psr/http-message: ^1.0
- symfony/deprecation-contracts: ^2.2|^3.0
- symfony/polyfill-php80: ^1.17
Requires (Dev)
- guzzlehttp/guzzle: ^7.2
- guzzlehttp/psr7: ^1.7
- http-interop/http-factory-guzzle: ^1.0
- php-http/mock-client: ^1.4.1
- phpstan/extension-installer: ^1.0.5
- phpstan/phpstan: ^0.12.57
- phpstan/phpstan-deprecation-rules: ^0.12.5
- phpunit/phpunit: ^8.5 || ^9.4
- symfony/cache: ^5.1.8
- symfony/phpunit-bridge: ^5.2
README
An easy to use wrapper for the Mapbox API, written in PHP.
Inspiration for this project was taken from KnpLabs/php-github-api.
Requirements
- PHP ^8.1
- A PSR-17 implementation
- A PSR-18 implementation
Installation
You can install the package via the composer require
command:
composer require liamclaridge444/php-mapbox-api
Usage
Instantiate a Mapbox client with your access token, then chain the API name and method (see example below).
$accessToken = 'your-access-token'; $client = new Mapbox($accessToken); $response = $client->datasets()->list();