Wikibase
MediaWiki Wikibase extension
|
A Generic MediaWikiAction API client created for use in Federated Properties, but could be used for other cases. More...
Public Member Functions | |
__construct (HttpRequestFactory $requestFactory, string $repoActionApiUrl, LoggerInterface $logger, string $userAgentServerName) | |
getUserAgent () | |
get (array $params) | |
Private Member Functions | |
getUrlFromParams (array $params) | |
Private Attributes | |
$requestFactory | |
$repoActionApiUrl | |
$logger | |
$userAgent | |
$userAgentServerName | |
A Generic MediaWikiAction API client created for use in Federated Properties, but could be used for other cases.
This uses MediaWiki's HttpRequestFactory to take advantage of built-in http settings such as timeouts, proxies etc. It uses an adapter to ResponseInterface to allow for consumers to also be compatible with other http clients such as Guzzle.
Wikibase\Repo\FederatedProperties\GenericActionApiClient::__construct | ( | HttpRequestFactory | $requestFactory, |
string | $repoActionApiUrl, | ||
LoggerInterface | $logger, | ||
string | $userAgentServerName | ||
) |
HttpRequestFactory | $requestFactory | |
string | $repoActionApiUrl | e.g. https://www.wikidata.org/w/api.php |
LoggerInterface | $logger | |
string | $userAgentServerName |
Wikibase\Repo\FederatedProperties\GenericActionApiClient::get | ( | array | $params | ) |
|
private |
Wikibase\Repo\FederatedProperties\GenericActionApiClient::getUserAgent | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
private |