Skip to content

omnischolar/inspire API reference

Floor
Provider · Omnischolar
Version
1.x
Conformance suite
not wired
Verified for real
Its README does not say
Licence
MIT
composer require omnischolar/inspire:1.x-dev

Read from the package's own PHP files at the commit ea140d0af945: its namespaces, classes, interfaces and enums, their public constants, properties and methods with their PHPDoc, and the options its factories take. Nothing of it is run.

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