sambo-search / sambo-search-client
PHP API Client for Sambo-Search API
0.1.0
2024-06-30 14:48 UTC
Requires
- php: >=8.1
- guzzlehttp/guzzle: ^7.8
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.59
- phpunit/php-code-coverage: ^10
- phpunit/phpunit: ^10
README
Synopsis
This is a simple PHP client for the Sambo-Search API. It simplifies the usage of the API by providing many helper functions and easy access to the API suite.
Prerequisites
- PHP >= 8.1
- Composer
Install
Install via Composer:
composer require sambo-search/sambo-search-client
Usage
Create a client with your public_key
and get products:
<?php use SamboSearch\Client\Client; $client = Client::getInstance(['public_key' => '<your-public-key-here>']); $response = $client->search('backpack'); // Access product details $products = $response->getProducts(); foreach ($products as $product) { echo 'ID: ' . $product->id . "\n<br>"; echo 'Name: ' . $product->name . "\n<br>"; }