SNCF.JS is a JavaScript library that allows you to easily use the SNCF api.
Only an api key is required to use the library. You can get one here
You can install SNCF.js using npm
or yarn
.
NPM
npm install sncf.js
Yarn
yarn install sncf.js
All operating systems are supported, including Mac, Windows, and Linux.
Copy .env.backup to .env and fill the token in the file.
SNCF_TOKEN=<your token>
const {Client} = require('sncf.js');
const sncf = new Client();
// Login to the SNCF api
sncf.login('your token' ) // returns a promise
The documentation is available here
You can find some examples here
SNCF.JS is object-oriented which makes its use simple, fast and efficient
SNCF.js is optimized to the maximum, and will soon have a caching system limiting the requests
Installation takes only a few seconds because the package is very light.
A bug, a request, need help? Do not hesitate to ask, we will be happy to answer you in the smallest details
A technical support that listens, efficient and fast, join the Discussions.
If you find a defect or would like to submit a feature request, please create an Issue and we will investigate right away.
Do you have a general inquiry? Please feel free to contact me on instagram.
We ❤️ feedback.