Download the PHP package andy87/php-client-hh without Composer
On this page you can find all versions of the php package andy87/php-client-hh. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download andy87/php-client-hh
More information about andy87/php-client-hh
Files in andy87/php-client-hh
Package php-client-hh
Short Description Typed PHP client for HeadHunter API.
License MIT
Informations about the package php-client-hh
PHP Client for HeadHunter API
Russian documentation
Typed PHP client for the HeadHunter API. The package provides a main ApiClientHh entry point, generated provider sections, request prompt DTOs, response DTOs, and schema classes.
The client is built on top of andy87/php-client-sdk and targets PHP 8.1 or newer.
Requirements
- PHP 8.1 or newer
- Composer
- OAuth access token for protected HeadHunter methods
Installation
Quick Start
Anonymous methods can be called without OAuth credentials:
Protected methods need an OAuth access token:
Configuration
You can pass configuration as an array:
Or from environment variables:
By default, HhConfig::fromEnv() reads:
HH_ACCESS_TOKENHH_CLIENT_IDHH_CLIENT_SECRET
clientId and clientSecret are stored in config for application-level integrations, but the default client does not perform a login/password flow and does not request tokens automatically.
Runtime Options
ApiClientHh supports shared runtime options from andy87/php-client-sdk: default request headers, event listeners, custom transport, retry policy, response decoding, and authorization resolver.
When passing SDK objects directly, use the SDK 0.7 grouped namespaces, for example and_y87\PhpClientSdk\Client\Event, and_y87\PhpClientSdk\Transport, and and_y87\PhpClientSdk\Security\Authorization.
Public API
and_y87\ClientsHh\ApiClientHh- main client with lazy provider access.and_y87\ClientsHh\HhConfig- connection configuration.and_y87\ClientsHh\BaseHhProvider- base provider for generated API sections.and_y87\ClientsHh\Generated\ProviderKey- enum with stable ASCII provider keys.and_y87\ClientsHh\Generated\Provider- generated provider sections.and_y87\ClientsHh\Generated\Prompt- generated request DTOs.and_y87\ClientsHh\Generated\Response- generated response DTOs.and_y87\ClientsHh\Generated\Schema- generated schema DTOs.
Generated prompt DTOs are filled through public properties. Create a prompt object first, then assign request values directly to its fields.
Errors
Transport, authorization, decoding, validation, and response hydration errors are raised by andy87/php-client-sdk exceptions. API error payloads for HTTP error responses are available through generated response DTOs via hasError(), getError(), and $response->error. Response DTOs also expose HTTP metadata through getStatusCode(), getHeaders(), getRawBody(), and getDecodedBody().