Aller au contenu

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

Lue dans les fichiers PHP du paquet au commit 0aa3cac2be0b : 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\Hal

  • HalSource class

    HAL, the French open archive (api.archives-ouvertes.fr, no key): the deposits of an author - by idHAL, ORCID or the name as signed - with their full texts in open access; a deposit by its HAL id, DOI or arXiv id; a search; and, for every query, a filter by domain: "shs.droit" is the legal scholarship (doctrine) HAL holds.

    7 methods · 2 constants

  • HalSourceFactory class

    HAL, the French open archive - no key.

    2 options

Omnischolar\Hal

HalSource class

final class HalSource extends HttpSource HalSource.php:27

HAL, the French open archive (api.archives-ouvertes.fr, no key): the deposits of an author - by idHAL, ORCID or the name as signed - with their full texts in open access; a deposit by its HAL id, DOI or arXiv id; a search; and, for every query, a filter by domain: "shs.droit" is the legal scholarship (doctrine) HAL holds.

const BASE_URI = 'https://api.archives-ouvertes.fr/'
const MAX_ROWS = 10000

The most rows HAL serves per page.

HalSource::__construct()

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

a filter on every query: HAL domain codes (shs.droit, chim, phys.cond...)

HalSource::getName()

public function getName(): string

HalSource::capabilities()

public function capabilities(): array

HalSource::author()

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

An author by their idHAL or ORCID: the preferred form of their name, the others as alternatives.

HalSource::works()

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

An author's deposits: by idHAL ("keitaro-nakatani"), ORCID (only the deposits where the ORCID was linked) or the name as signed ("Keitaro Nakatani", exact).

HalSource::work()

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

HalSourceFactory class

final class HalSourceFactory extends SourceFactory HalSourceFactory.php:18

HAL, the French open archive - no key.

options: domains: ['shs.droit'] # a filter on every query (HAL domain codes); none by default base_uri: 'https://api.archives-ouvertes.fr/' throttle: 0 # seconds between two calls

Options

OptionDefault
domains[]
base_uriHalSource::BASE_URI