Aller au contenu

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

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

  • OpenAlexSource class

    OpenAlex (api.openalex.org): an author's profile with their counts (works, citations, h-index, i10-index, by year) and the institutions seen on their works; their works with abstracts, citations and open-access links; any work by its OpenAlex id, DOI or PubMed id; a search.

    8 methods · 2 constants

  • OpenAlexSourceFactory class

    OpenAlex: profiles, works, citations, h-index - no key needed.

    3 options

Omnischolar\OpenAlex

OpenAlexSource class

final class OpenAlexSource extends HttpSource OpenAlexSource.php:31

OpenAlex (api.openalex.org): an author's profile with their counts (works, citations, h-index, i10-index, by year) and the institutions seen on their works; their works with abstracts, citations and open-access links; any work by its OpenAlex id, DOI or PubMed id; a search.

Free without a key within a daily budget; a free key (api_key) raises it tenfold. The mailto is sent as OpenAlex asks of polite callers.

const BASE_URI = 'https://api.openalex.org/'
const MAX_PER_PAGE = 100

The most per page OpenAlex serves.

OpenAlexSource::__construct()

public function __construct(HttpClientInterface $http, readonly ?string $mailto = null, readonly ?string $apiKey = null, readonly bool $paratext = false, string $baseUri = self::BASE_URI, array $headers = [], float $throttle = 0.0)

OpenAlexSource::getName()

public function getName(): string

OpenAlexSource::capabilities()

public function capabilities(): array

OpenAlexSource::author()

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

OpenAlexSource::works()

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

OpenAlexSource::work()

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

OpenAlexSource::abstract()

public static function abstract(?array $index): ?string

The abstract, rebuilt from the index OpenAlex serves (each word with its positions).

OpenAlexSourceFactory class

final class OpenAlexSourceFactory extends SourceFactory OpenAlexSourceFactory.php:20

OpenAlex: profiles, works, citations, h-index - no key needed.

options: mailto: 'support@glitchr.io' # sent with every call, as OpenAlex asks api_key: ~ # a free key from openalex.org/settings/api: ten times the keyless daily budget paratext: false # true keeps covers, tables of contents and the like base_uri: 'https://api.openalex.org/' throttle: 0 # seconds between two calls

Options

OptionDefault
api_keynull
paratextfalse
base_uriOpenAlexSource::BASE_URI