Aller au contenu

omnischolar/arxiv 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/arxiv:1.x-dev

Lue dans les fichiers PHP du paquet au commit c24ed75ef37d : 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\Arxiv

  • ArxivSource class

    arXiv (export.arxiv.org/api, Atom, no key): preprints - an author's by name, one by its arXiv id (old "hep-th/9711200" or new "2401.12345" style), a search - with their abstracts, categories, PDF, and the DOI and journal reference of the published version when the authors added them.

    6 methods · 2 constants

  • ArxivSourceFactory class

    arXiv: preprints, by author name, id or search - no key.

    2 options

Omnischolar\Arxiv

ArxivSource class

final class ArxivSource extends HttpSource ArxivSource.php:29

arXiv (export.arxiv.org/api, Atom, no key): preprints - an author's by name, one by its arXiv id (old "hep-th/9711200" or new "2401.12345" style), a search - with their abstracts, categories, PDF, and the DOI and journal reference of the published version when the authors added them.

arXiv knows no author profiles, and asks for one call every three seconds: the throttle leaves them.

const BASE_URI = 'https://export.arxiv.org/api/'
const MAX_RESULTS = 2000

The most entries arXiv serves per call.

ArxivSource::__construct()

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

ArxivSource::getName()

public function getName(): string

ArxivSource::capabilities()

public function capabilities(): array

ArxivSource::works()

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

An author's preprints, by the name they sign ("Juan Maldacena", "Maldacena, Juan"). The cursor is an offset.

ArxivSource::work()

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

ArxivSourceFactory class

final class ArxivSourceFactory extends SourceFactory ArxivSourceFactory.php:18

arXiv: preprints, by author name, id or search - no key.

options: throttle: 3 # seconds between two calls, as arXiv asks mailto: 'support@glitchr.io' # in the User-Agent base_uri: 'https://export.arxiv.org/api/'

Options

OptionDefault
throttle3.0
base_uriArxivSource::BASE_URI