seoapi-ru / api-client-php
Public API PHP client
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 2
pkg:composer/seoapi-ru/api-client-php
Requires
- php: ^7.1.3
 - ext-json: *
 - ext-zlib: *
 - guzzlehttp/guzzle: ^6.0.0
 - symfony/http-client: 4.3.*
 
Requires (Dev)
- fzaninotto/faker: ^1.8
 - justinrainbow/json-schema: ^5.0.0
 - league/uri: ^5.3.0
 - phpunit/phpunit: ^7.0.0
 - symfony/dotenv: ^4.0.0
 
This package is not auto-updated.
Last update: 2025-10-22 18:56:09 UTC
README
Usage
Install the client with Composer:
composer require seoapi-ru/api-client-php
Create client with username and password to authenticate:
$client = ApiClient::fromCredentials( 'username', 'password', new HttpClientFactory() );
...or using predefined session token.
// ... first steps: see previous example $client = ApiClient::fromToken(self::VALID_TOKEN, self::BASE_URL, new HttpClientFactory());
Use client methods to call API counterparts.
$regions = $client->getRegions('москва'); $stats = $client->getDailyStatsReport('google', 2019, 2); // etc, see tests
For expected JSON response formats refer JSON schemas located at tests/Functional/**.*Test.php