stan-api
Support non officiel de l'API du Service de Transport de l'Agglomération Nancéienne (STAN)
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (2.3%) to scientific vocabulary
Keywords
Repository
Support non officiel de l'API du Service de Transport de l'Agglomération Nancéienne (STAN)
Basic Info
- Host: GitHub
- Owner: maelgangloff
- License: gpl-3.0
- Language: TypeScript
- Default Branch: master
- Homepage: https://www.npmjs.com/package/stan-api
- Size: 86.9 KB
Statistics
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 0
- Releases: 5
Topics
Metadata Files
README.md
Stan
Support non officiel de l'API du Service de Transport de l'Agglomération Nancéienne (STAN).
Ce module permet de récupérer: - les prochains passages - les lignes - les directions - les arrêts
Kind: global class
- Stan
- .getLignes() ⇒
Promise.<Array.<Ligne>> - .getArrets(ligne) ⇒
Promise.<Array.<Arret>> - .getProchainsPassages(arret) ⇒
Promise.<Array.<Passage>> - .getDirections(ligne) ⇒
Promise.<Array.<Direction>> - .getArretsDirection(direction) ⇒
Promise.<Array.<Arret>>
- .getLignes() ⇒
Stan.getLignes() ⇒ Promise.<Array.<Ligne>>
Lister les lignes du réseau de transport
Kind: static method of Stan
Example
```js
const { Stan } = require('stan-api')
Stan.getLignes().then(lignes => console.log(lignes)) ```
Stan.getArrets(ligne) ⇒ Promise.<Array.<Arret>>
Liste des arrêts d'une ligne
NB: Un arret peut être commun à plusieurs lignes.
Kind: static method of Stan
| Param | Type | Description |
| --- | --- | --- |
| ligne | Ligne | Ligne |
Example
```js
const { Stan } = require('stan-api')
const ligneT4 = { id: 2332, numlignepublic: 'T4', osmid: 'line:GST:4-97', libelle: 'Tempo 4 - Laxou CLB <> Houdemont Porte Sud' } Stan.getArrets(ligneT4).then(arrets => console.log(arrets)) ```
Stan.getProchainsPassages(arret) ⇒ Promise.<Array.<Passage>>
Lister les prochains passages d'un arrêt avec le temps d'attente estimé. Il n'est pas nécessaire de préciser une ligne, on récupère alors tous les passages des lignes desservants l'arrêt
Kind: static method of Stan
| Param | Type | Description |
| --- | --- | --- |
| arret | Arret | Arrêt |
Example
```js
const { Stan } = require('stan-api')
const arret = {
ligne: {
id: 2332,
numlignepublic: 'T4',
osmid: 'line:GST:4-97',
libelle: 'Tempo 4 - Laxou CLB <> Houdemont Porte Sud'
},
libelle: 'Place Stanislas - Dom Calmet',
osmid: 'stoppoint:GST:SP:NYPCL1'
}
Stan.getProchainsPassages(arret).then(p => {
console.log(Liste des prochains passages de l'arrêt "${arret.libelle}" de la ligne ${arret.ligne.numlignepublic}:
${p.map(passage =>${passage.direction} - Temps d'attente: ${Math.trunc(passage.tempsmin/60)}H${passage.temps_min%60}min).join('\n')})
})
Exemple sortie:
Liste des prochains passages de l'arrêt "Place Stanislas - Dom Calmet" de la ligne T4:
Direction Houdemont Porte Sud - Temps d'attente: 0H1min
Direction Houdemont Porte Sud - Temps d'attente: 0H8min
Direction Laxou Champ-le-Boeuf - Temps d'attente: 0H1min
Direction Laxou Champ-le-Boeuf - Temps d'attente: 0H8min
```
Stan.getDirections(ligne) ⇒ Promise.<Array.<Direction>>
Lister les directions d'une ligne
Kind: static method of Stan
| Param | Type | Description |
| --- | --- | --- |
| ligne | Ligne | Ligne |
Example
```js
const { Stan } = require('stan-api')
const ligneT4 = { id: 2332, numlignepublic: 'T4', osmid: 'line:GST:4-97', libelle: 'Tempo 4 - Laxou CLB <> Houdemont Porte Sud' } Stan.getDirections(ligneT4).then(directions => console.log(directions)) ```
Stan.getArretsDirection(direction) ⇒ Promise.<Array.<Arret>>
Lister les arrêts sur le chemin d'une direction d'une ligne
Kind: static method of Stan
| Param | Type | Description |
| --- | --- | --- |
| direction | Direction | Direction d'une ligne |
Owner
- Name: Maël Gangloff
- Login: maelgangloff
- Kind: user
- Location: Nancy, France
- Company: Polytech Nancy | @PolytechSN
- Website: maelgangloff.fr
- Twitter: GangloffMael
- Repositories: 34
- Profile: https://github.com/maelgangloff
Student at Polytech Nancy - University of Lorraine, France | Discord: maelgangloff#1907
Citation (CITATION.cff)
cff-version: 1.2.0
title: Stan API
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Maël
family-names: Gangloff
email: contact@maelgangloff.fr
orcid: 'https://orcid.org/0000-0002-7729-724X'
identifiers:
- type: url
value: >-
https://github.com/maelgangloff/stan-api/releases/tag/1.1.5
description: Release v3.0.2 of scolengo-api
repository-code: 'https://github.com/maelgangloff/stan-api'
abstract: Support non officiel de l'API du Service de Transport de l'Agglomération Nancéienne (STAN)
keywords:
- STAN
- API
- Nancy
license: GPL-3.0-or-later
version: 1.1.5
date-released: '2024-02-17'
license-url: 'https://github.com/maelgangloff/stan-api/blob/master/LICENSE'
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 0
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: about 1 hour
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 3.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- ExPl0siF (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- npm 30 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 7
- Total maintainers: 1
npmjs.org: stan-api
Support non officiel de l'API du Service de Transport de l'Agglomération Nancéienne (STAN)
- Homepage: https://github.com/maelgangloff/stan-api#readme
- License: ISC
-
Latest release: 1.1.5
published about 2 years ago
Rankings
Maintainers (1)
Dependencies
- @types/node ^18.0.0 development
- @types/qs ^6.9.7 development
- @typescript-eslint/eslint-plugin ^5.30.3 development
- @typescript-eslint/parser ^5.30.3 development
- eslint ^8.19.0 development
- eslint-plugin-node ^11.1.0 development
- jsdoc-to-markdown ^7.1.1 development
- standard ^17.0.0 development
- ts-standard ^11.0.0 development
- typescript ^4.7.4 development
- axios ^0.27.2
- qs ^6.11.0
- 357 dependencies
- actions/cache v2 composite
- actions/checkout v2 composite
- actions/setup-node v1 composite
- actions/checkout v3 composite
- actions/setup-node v3 composite