Aller au contenu

omnischolar/inspire Référence de l’API

Étage
Fournisseur · Omnischolar
Version
1.x
Suite de conformité
non branchée
Vérifié en réel
Son README ne le dit pas
Licence
MIT
composer require omnischolar/inspire:1.x-dev

Lue dans les fichiers PHP du paquet au commit ea140d0af945 : ses espaces de noms, classes, interfaces et énumérations, leurs constantes, propriétés et méthodes publiques avec leur PHPDoc, et les options que prennent ses fabriques. Rien n’en est exécuté.

Omnischolar\Inspire

  • InspireSource class

    INSPIRE-HEP (inspirehep.net/api, no key): high-energy physics. An author's profile - by INSPIRE record, BAI ("Juan.M.Maldacena.1") or ORCID - with their positions and INSPIRE's citation summary (citations, h-index over the citeable papers); their literature with citation counts, arXiv ids, DOIs and journal references; a paper by its INSPIRE record, DOI or arXiv id; a search in INSPIRE's own query language.

    7 methods · 2 constants

  • InspireSourceFactory class

    INSPIRE-HEP: high-energy physics literature, authors and citations - no key.

    2 options

Omnischolar\Inspire

InspireSource class

final class InspireSource extends HttpSource InspireSource.php:32

INSPIRE-HEP (inspirehep.net/api, no key): high-energy physics. An author's profile - by INSPIRE record, BAI ("Juan.M.Maldacena.1") or ORCID - with their positions and INSPIRE's citation summary (citations, h-index over the citeable papers); their literature with citation counts, arXiv ids, DOIs and journal references; a paper by its INSPIRE record, DOI or arXiv id; a search in INSPIRE's own query language.

INSPIRE allows 15 calls in 5 seconds.

const BASE_URI = 'https://inspirehep.net/api/'
const MAX_SIZE = 1000

The most records INSPIRE serves per page.

InspireSource::__construct()

public function __construct(HttpClientInterface $http, string $baseUri = self::BASE_URI, array $headers = [], float $throttle = 0.0)

InspireSource::getName()

public function getName(): string

InspireSource::capabilities()

public function capabilities(): array

InspireSource::author()

public function author(Identifier|string $author): ?Author

InspireSource::works()

public function works(Identifier|string $author, ?Query $query = null): Page

An author's literature: by BAI ("Juan.M.Maldacena.1"), INSPIRE author record or ORCID (both through the BAI), or a name INSPIRE matches ("Maldacena, Juan"). The cursor is a page number.

InspireSource::work()

public function work(Identifier|string $id): ?Work
public function search(Query $query): Page

A search: Query::$text is INSPIRE's own query language ("t wormholes and a maldacena"), the rest is added to it.

InspireSourceFactory class

final class InspireSourceFactory extends SourceFactory InspireSourceFactory.php:18

INSPIRE-HEP: high-energy physics literature, authors and citations - no key.

options: throttle: 0.35 # seconds between two calls (INSPIRE allows 15 in 5 s) mailto: 'support@glitchr.io' # in the User-Agent base_uri: 'https://inspirehep.net/api/'

Options

OptionDefault
throttle0.35
base_uriInspireSource::BASE_URI