\O3PO_Ads

Encapsulates the interface with the external service ads.

Provides methods to interface with ads.

Summary

Methods
Properties
Constants
get_cited_by_bibentries()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
get_cited_by_json()
bibcodes_to_query_url()
No private properties found
N/A

Methods

get_cited_by_bibentries()

get_cited_by_bibentries(string  $ads_api_search_url, string  $api_token, string  $eprint,   $storage_time = 60 * 60 * 12, integer  $max_number_of_citations = 1000,   $timeout = 10) : mixed

Get cited-by information as an array of O3PO_Bibentries.

Parameters

string $ads_api_search_url

ADS api url.

string $api_token

ADS API token.

string $eprint

Eprint for which cited-by information is to be retrieved.

$storage_time
integer $max_number_of_citations

Maximal number of citations to return.

$timeout

Returns

mixed —

Cited-by information as an array of O3PO_Bibentries or WP_Error

get_cited_by_json()

get_cited_by_json(string  $ads_api_search_url, string  $api_token, string  $eprint,   $storage_time = 60 * 60 * 12,   $timeout = 6) : mixed

Get json encoded cited-by information.

Retrieves cited-by information in json format from ads.

Parameters

string $ads_api_search_url

ADS api url.

string $api_token

ADS API token.

string $eprint

Eprint for which cited-by information is to be retrieved.

$storage_time
$timeout

Returns

mixed —

Json encoded cited-by information or a WP_Error in case of an error.

bibcodes_to_query_url()

bibcodes_to_query_url(string  $ads_api_search_url, array  $bibcodes, integer  $max_number_of_citations) 

Query url for detailed bibliographic data

Construct the full query for retrieving detailed bibliographic data url from an array of bibcodes

Parameters

string $ads_api_search_url

ADS api url.

array $bibcodes

Bibcodes for which to construct the query url.

integer $max_number_of_citations

Maximal number of citations to return.