bus-mj
v1.1.6
Published
package for BUS station in Mahajanga
Downloads
24
Readme
API ho amantarana ny fivezivezian'ny bus eto Mahajanga
TANJONA :
Ho fanampina ireo vahiny, hitady ny bus tokony andehanany
Hanamorana ny fitadidiana ny trajet an'bus iray
Hialana @ tsy fahafantarana ny "arret" tokony ialana
Ahitana ny:
- "point de depart" sy "point d'arrivee"
- distance entre "deux point"
- temps de circulation
- ...
import :
import { getBus, getAllBus, getAllStop, getStop } from 'bus-mj';
usage :
// declarer une fonction asynchrone
async function main() {
// maka ny lisitry ny bus rehetra
console.log(await getAllBus());
}
main();
[
{
"BUS_ID":3,
"BUS_NAME":"ligne 3"
},
{
"BUS_ID":5,
"BUS_NAME":"ligne 5"
},
{
"BUS_ID":70,
"BUS_NAME":"ligne 7"
},
{
"BUS_ID":71,
"BUS_NAME":"ligne 7"
},
{
"BUS_ID":8,
"BUS_NAME":"ligne 8"
},
{
"BUS_ID":11,
"BUS_NAME":"ligne 11"
},
{
"BUS_ID":15,
"BUS_NAME":"ligne 15"
}
]
// declarer une fonction asynchrone
async function main() {
// maka ny lisitry ny arret rehetra
console.log(await getAllStop());
// maka ny lisitry ny arret @bus mitondra id=3
console.log(await getStop(3));
// maka ny lisitry ny bus mandalo @ arret de depart='star' sy arrive='poste'
console.log(await getBus('star', 'poste'));
}
main();
API :
https://bus-mj.onrender.com/api?depart=star&fin=poste
fanazavana: depart: arret du point de depart fin: arret du point finnal
ny azo:
{
"BUS_ID": "identifiant ny bus",
"BUS_NAME": "anaran'ilay bus",
"BUS_PLAQUE": "lokon'ilay plaque",
"LONG": "halaviran'ny lalana",
"TIME": "fotoana lany",
"YOUR_TRAJET": ["filaharan'ireo arret handalovana"]
}
- valiny ilay ohatra:
[
{
"BUS_ID": 3,
"BUS_NAME": "ligne 3",
"BUS_PLAQUE": "",
"LONG": 22,
"TIME": 1,
"YOUR_TRAJET": [
"star",
"plaque 7",
"loterana",
"bazary kely",
"csb",
"croisement cimetiere",
"jovena",
"lalatapaka",
"plaque",
"miaramila",
"bazary antanimasaja",
"pompy",
"bizo",
"galana",
"manjarisoa",
"jardin Caylah",
"bain douche",
"photo sport",
"hôtel de ville",
"croix rouge",
"poste"
]
},
{
"BUS_ID": 70,
"BUS_NAME": "ligne 7",
"BUS_PLAQUE": "bleu",
"LONG": 32,
"TIME": 51,
"YOUR_TRAJET": [
"star",
"plaque 7",
"loterana",
"bazary kely",
"csb",
"croisement cimetiere",
"jovena",
"lalatapaka",
"plaque",
"miaramila",
"bazary antanimasaja",
"pompy",
"bizo",
"galana",
"manjarisoa",
"jardin Caylah",
"galax",
"mahabibo",
"h\u00f4tel de ville",
"croix rouge",
"poste"
]
},
{
"BUS_ID": 71,
"BUS_NAME": "ligne 7",
"BUS_PLAQUE": "rouge",
"LONG": 5,
"TIME": 53,
"YOUR_TRAJET": [
"star",
"plaque 7",
"loterana",
"bazary kely",
"csb",
"croisement cimetiere",
"jovena",
"lalatapaka",
"plaque",
"miaramila",
"bazary antanimasaja",
"pompy",
"bizo",
"galana",
"manjarisoa",
"jardin Caylah",
"bain douche",
"mahabibo",
"patel",
"bata",
"maki-loc",
"tsaralaza",
"pont blanc",
"maman'i phillipine",
"rond point cité",
"rond point taxi",
"croisement soatata",
"secaline",
"bar rotsaka",
"croisement bloc",
"pharmacie",
"hopital manarapenitra",
"caserne",
"barea",
"airtel",
"solima",
"lycée technique",
"élevage",
"roche rouge",
"maison verte",
"jardin d'amour",
"nandrasana",
"cnaps",
"bord",
"akbar",
"kakal",
"boa",
"Bazary be",
"score",
"poste"
]
}
]
Mbola hanampiana azy :
- donnee de ligne du BUS: 6, 9, 10, 11, 12, 15, 18
- temps de circulation
- longeur
- ireo arret ao anaty ny fokotany irray
- depart=fokotany & arrivee=fokotany
- mamatatra ny hoe mbola miasa ve io bus io @zao (maka ny heure actuel)
- mifindra BUS raha tokony hifindra rehefa tonga @arret iray (Oh: belobaka vers petit plage)
- ...