Skip to content
On this page

SNCF.JS - Introduction

Introduction

SNCF.JS is a JavaScript library that allows you to easily use the SNCF api.

drawing

Requirements

Only an api key is required to use the library. You can get one here


Installation

You can install SNCF.js using npm or yarn.

NPM

bash
npm install sncf.js

Yarn

bash
yarn install sncf.js

All operating systems are supported, including Mac, Windows, and Linux.


Quick start

Get your SNCF Token

Copy .env.backup to .env and fill the token in the file.

env
SNCF_TOKEN=<your token>

Import the library have fun!

javascript
const {Client} = require('sncf.js');
const sncf = new Client();

// Login to the SNCF api
sncf.login('your token' ) // returns a promise

Documentation

The documentation is available here

You can find some examples here


Features

Easy to use

SNCF.JS is object-oriented which makes its use simple, fast and efficient

Lightning fast

SNCF.js is optimized to the maximum, and will soon have a caching system limiting the requests

Easy install

Installation takes only a few seconds because the package is very light.

✋ Responsive and friendly support

A bug, a request, need help? Do not hesitate to ask, we will be happy to answer you in the smallest details


Support

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.