Lue dans les fichiers PHP du paquet au commit 2c03bfffd47d : 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é.
LaunchesSourceclassThe Space Devs' Launch Library 2 (ll.thespacedevs.com/2.3.0): orbital launches, past and planned - a launch by its id (its rocket, provider, mission and orbit, pad and its place, date and its precision, window, status, probability, the failure's reason), a search by text, and the launches of a period as occurrences: each has its time (NET, "no earlier than") and its place (the pad's latitude and longitude).
6 methods · 3 constants
LaunchesSourceFactoryclassThe Space Devs' Launch Library 2: orbital launches, past and planned, by id, text or period - no key needed (15 calls an hour; a supporter's key raises it).
3 options
Omnilab\Launches
LaunchesSource class
final class LaunchesSource extends HttpSource LaunchesSource.php:34
The Space Devs' Launch Library 2 (ll.thespacedevs.com/2.3.0): orbital launches, past and planned - a launch by its id (its rocket, provider, mission and orbit, pad and its place, date and its precision, window, status, probability, the failure's reason), a search by text, and the launches of a period as occurrences: each has its time (NET, "no earlier than") and its place (the pad's latitude and longitude).
No key: 15 calls an hour for an unauthenticated caller (429 beyond); a key from The Space Devs' supporters raises it ("api_key", sent as "Authorization: Token ..."). LL2 filters by no box nor circle: an occurrence query names no place (or is refused), and narrows by provider, rocket, location or crew instead.
const BASE_URI = 'https://ll.thespacedevs.com/2.3.0/'const MAX_PER_PAGE = 100The most launches a page holds.
const FILTERS = ['provider' => 'lsp__name', 'rocket' => 'rocket__configuration__full_name__icontains', 'location' => 'location__ids', 'crewed' => 'is_crewed', 'status' => 's…The filters read: key => LL2's parameter.
LaunchesSource::__construct()
public function __construct(HttpClientInterface $http, string $baseUri = self::BASE_URI, array $headers = [], float $throttle = 0.0)LaunchesSource::getName()
public function getName(): stringLaunchesSource::capabilities()
public function capabilities(): arrayLaunchesSource::entity()
public function entity(Identifier|string $id): ?EntityA launch by its id (a UUID: launchlibrary:..., or its API address); null when LL2 has none.
LaunchesSource::search()
public function search(Query $query): PageLaunches whose name, mission, rocket or provider holds the text (LL2's search), the earliest first, by offset.
LaunchesSource::occurrences()
public function occurrences(OccurrenceQuery $query): PageThe launches of a period (no place: anywhere; LL2 filters by no box nor circle, so a place is refused), by NET, the source's order being the earliest first; filters: provider (LL2's name: SpaceX), rocket (a part of its full name: Falcon 9), location (LL2's location ids), crewed (true/false), status (LL2's status ids: 3 success, 4 failure...), orbit (a part of its name: Low Earth Orbit). Sorts newest and oldest.
LaunchesSourceFactory class
final class LaunchesSourceFactory extends SourceFactory LaunchesSourceFactory.php:21
The Space Devs' Launch Library 2: orbital launches, past and planned, by id, text or period - no key needed (15 calls an hour; a supporter's key raises it).
options: mailto: 'support@glitchr.io' # in the User-Agent api_key: '%env(LL2_API_KEY)%' # optional: a key from The Space Devs, sent as "Authorization: Token ..." throttle: 0 # seconds between two calls base_uri: 'https://ll.thespacedevs.com/2.3.0/' # or https://lldev.thespacedevs.com/2.3.0/ (stale data, no limit) to develop
Options
| Option | Default | |
|---|---|---|
api_key | null | |
throttle | 0.0 | |
base_uri | LaunchesSource::BASE_URI |