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é.
InspireSourceclassINSPIRE-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
InspireSourceFactoryclassINSPIRE-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 = 1000The 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(): stringInspireSource::capabilities()
public function capabilities(): arrayInspireSource::author()
public function author(Identifier|string $author): ?AuthorInspireSource::works()
public function works(Identifier|string $author, ?Query $query = null): PageAn 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): ?WorkInspireSource::search()
public function search(Query $query): PageA 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
| Option | Default | |
|---|---|---|
throttle | 0.35 | |
base_uri | InspireSource::BASE_URI |