Skip to content

seoapi-ru/api-client-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API client for PHP

Build Status

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

About

Public API PHP client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages