Read the SNCF authentication key from an environment variable

This commit is contained in:
Dimitri Lozeve 2022-09-09 22:45:13 +02:00
parent efb0c4d1fe
commit ab4073f31f
2 changed files with 14 additions and 5 deletions

View file

@ -5,11 +5,12 @@
Get an access to the [[https://www.digital.sncf.com/startup/api][SNCF API]]. By creating an account, you should
receive an email with your authentication key.
You can now call the program with the authentication key as the first
argument.
The program reads the authentication key from the =SNCF_AUTH_KEY=
environment variable.
#+begin_src sh
$ sncf <sncf-key>
$ export SNCF_AUTH_KEY=<sncf-key>
$ sncf
┌────────────┬────────────────────────────────┬───────────────┐
│ Réseau │ Direction │ Heure │
├────────────┼────────────────────────────────┼───────────────┤