This JS package helps querying the DILA API
You need to set two environment variables : OAUTH_CLIENT_ID
and OAUTH_CLIENT_SECRET
.
These variables are the "oauth identifier" defined in your custom application in the AIFE portal
You can also override the variables API_HOST
(https://api.aife.economie.gouv.fr/dila/legifrance-beta/lf-engine-app) and TOKEN_HOST
(https://oauth.aife.economie.gouv.fr) for AIFE endpoints.
const DilaApiClient = require("dila-api-client");
const dilaApi = new DilaApiClient();
// fetch table des matières code-du-travail
dilaApi
.fetch({
path: "consult/code/tableMatieres",
method: "POST",
params: {
date: new Date().getTime(),
sctId: "",
textId: "LEGITEXT000006072050"
}
})
.then(console.log);
// fetch list of available codes
dilaApi
.fetch({
path: "list/code",
method: "POST"
})
.then(console.log);
See also ./examples
you need to set the DEBUG=dila-api-client
environment variable in order to see
the output of inner logs.
Trigger a custom build on Travis (in the "More options" right menu) on the master
branch with a custom config:
env:
global:
- RELEASE=true
You can change the lerna arguments though the LERNA_ARGS
variable.
env:
global:
- STANDARD_VERSION_ARGS="--release-as major"
- RELEASE=true