Lue dans les fichiers PHP du paquet au commit e0de7a748df3 : 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é.
JudilibreSourceclassJudilibre, the Cour de cassation's open data of the judicial courts' decisions, through PISTE (the API's OpenAPI description, version 1.2.5):
9 methods · 4 constants
JudilibreSourceFactoryclassJudilibre, through PISTE. The application signs with its PISTE OAuth credentials, or with its PISTE API key (the KeyId header):
4 options
Omnilex\Judilibre
JudilibreSource class
final class JudilibreSource extends HttpSource implements SearchInterface, DecisionReaderInterface, CitationsInterface, RecentInterface JudilibreSource.php:44
Judilibre, the Cour de cassation's open data of the judicial courts' decisions, through PISTE (the API's OpenAPI description, version 1.2.5):
GET /search full-text search with filters, 50 a page, 10 000 at most GET /decision one decision, whole GET /export batches of decisions by date, for what is new GET /taxonomy the keys the filters take, with their labels GET /transactionalhistory what was created, updated or deleted since a date
The decisions are pseudonymised by the Cour de cassation before they are published. They are given as they are: nothing here tries to put a name back on a person, by cross-reference or otherwise, and an application that shows them must not either (the re-use conditions forbid it). When Judilibre withdraws a decision - changes() says so - the application must drop its copy.
const BASE_URI = 'https://api.piste.gouv.fr/cassation/judilibre/v1.0'const SANDBOX_URI = 'https://sandbox-api.piste.gouv.fr/cassation/judilibre/v1.0'const MAX = 50The most results /search gives per page.
const BATCH_MAX = 1000The most decisions /export gives per batch.
JudilibreSource::__construct()
public function __construct(HttpClientInterface $http, string $baseUri = self::BASE_URI, ?TokenProviderInterface $auth = null, array $headers = [], float $throttle = 0.5, readonly string $recent = 'update', readonly bool $resolve = false)$recentthe date recent() reads: "update" (created or updated in the base) or "creation"
$resolveask for labels in place of keys (resolve_references)
$headersthe KeyId header, when the application signs with its PISTE key
JudilibreSource::getName()
public function getName(): stringJudilibreSource::capabilities()
public function capabilities(): CapabilitiesJudilibreSource::search()
public function search(Query $query): ResultsJudilibreSource::recent()
public function recent(\DateTimeInterface $since, ?Query $query = null): ResultsJudilibreSource::decision()
public function decision(Identifier|string $id): ?DecisionJudilibreSource::citations()
public function citations(Identifier|string $id, int $limit = 100): arrayJudilibreSource::taxonomy()
public function taxonomy(string $id, ?string $context = null): arrayThe terms of one of Judilibre's lists, key => label: "jurisdiction", "chamber", "formation", "type", "theme", "publication", "solution", "location"... ($context: "cc", "ca", "tj" for the lists that depend on the kind of court). What Query::$jurisdictions, $types and $subjects take, and what labels the keys the decisions carry.
JudilibreSource::changes()
public function changes(\DateTimeInterface $since, ?string $cursor = null, int $limit = 500): arrayWhat happened in the base since that moment, oldest first: each decision created, updated or deleted. A deleted decision must be deleted by whoever kept a copy.
$cursorthe "next" of the page before
JudilibreSourceFactory class
final class JudilibreSourceFactory extends SourceFactory JudilibreSourceFactory.php:26
Judilibre, through PISTE. The application signs with its PISTE OAuth credentials, or with its PISTE API key (the KeyId header):
options: client_id: '...' # with client_secret: OAuth, client credentials client_secret: '...' key_id: '...' # or the application's API key, alone sandbox: false # PISTE's sandbox, with the sandbox application's credentials recent: update # the date recent() reads: update (created or updated in the base) or creation resolve_references: false # labels in place of keys in the answers throttle: 0.5 # seconds between two calls (the quotas are per application, on the portal) base_uri, token_uri # to override either
Options
| Option | Default | |
|---|---|---|
sandbox | false | |
recent | 'update' | |
resolve_references | false | |
throttle | 0.5 |