dataprovider / sdk
SDK for https://api.dataprovider.com
v1.0.0
2025-07-14 11:37 UTC
Requires
- ext-curl: *
- ext-json: *
Requires (Dev)
- phpunit/phpunit: ^12.2
This package is auto-updated.
Last update: 2026-04-15 09:31:41 UTC
README
A lightweight SDK for interacting with the Dataprovider.com API in PHP.
This client provides a convenient way to authenticate, build requests, and handle responses for GET, POST, and PUT operations.
🚀 Installation
Use Composer to install the SDK:
composer require dataprovider/sdk
✅ Requirements
- PHP >= 8.3
- PHP cURL extension enabled
- Composer for dependency management
🔧 Usage
require __DIR__ . '/vendor/autoload.php'; use Dataprovider\SDK\Client\ApiClient; $apiClient = new ApiClient("username", "password"); try { $response = $apiClient->get('/datasets/list'); } catch (RuntimeException $e) { echo "An error occurred ({$e->getCode()}): {$e->getMessage()}" . PHP_EOL; return; } // Access the response data as text print_r($response->getBody()); // Access the response data as array ($associative=true) or object ($associative=false) print_r($response->getJsonBody(true));
See examples for more.