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é.
OpenAlexSourceclassOpenAlex (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
OpenAlexSourceFactoryclassOpenAlex: 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 = 100The 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(): stringOpenAlexSource::capabilities()
public function capabilities(): arrayOpenAlexSource::author()
public function author(Identifier|string $author): ?AuthorOpenAlexSource::works()
public function works(Identifier|string $author, ?Query $query = null): PageOpenAlexSource::work()
public function work(Identifier|string $id): ?WorkOpenAlexSource::search()
public function search(Query $query): PageOpenAlexSource::abstract()
public static function abstract(?array $index): ?stringThe 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
| Option | Default | |
|---|---|---|
api_key | null | |
paratext | false | |
base_uri | OpenAlexSource::BASE_URI |