gbfs-system
Version:
A Node.js package that enables real-time data retrieval from GBFS (General Bikeshare Feed Specification) using the auto-discovery URLs provided by MobilityData. It allows developers to easily access and utilize live bikeshare system information, station i
63 lines • 2.27 kB
TypeScript
import { ISystem } from "./types.js";
/**
* Get all registered gbfs systems and perform search using a known location, name, system Id or country code.
*/
export declare class Systems {
static GBFS_SYSTEM_CSV_URL: string;
private globalSystems;
private constructor();
/**
* Fetch all registered systems and instanciate the Systems class
* @returns {Systems} A new instance of the Systems class
*/
static initialize(): Promise<Systems>;
/**
* Return all found systems in the given location (City)
*
* @returns {ISystem[]} An array of all registered systems found in the remote system.csv
*/
get getAllSystems(): ISystem[];
/**
* Return all found systems in the given location (City)
*
* @param {string} location - The city name to look for. exp : 'Paris'
* @returns An array of found Systems in that location
*/
findByLocation(location: string): ISystem[];
/**
* Return all found systems having the given country code parameter
*
* @param {string} countryCode - The country code to look for. exp: 'CA'
* @returns An array of found Systems in that country
*/
findByCountryCode(countryCode: string): ISystem[];
/**
* Returns a system having the given system ID parameter
*
* @param {string} systemID - The systemID parameter to look for. exp: 'Bixi_MTL'
* @returns a System object
*/
findBySystemID(systemID: string): ISystem;
/**
* Return all found systems having the given name
*
* @param {string} name - A name to look for. exp : 'Paris'
* @returns An array of found Systems having that name
*/
findByName(name: string): ISystem[];
/**
* Converts CSV raw data into an array of Objects.
*
* @param {string} csvData - The CSV data to convert.
* @returns A promise that resolves to an array of System object (ISystem[]) representing CSV data.
*/
private static convertCSVtoObjects;
/**
* Normalizes a string by making it lowercase and removing accents.
*
* @param {string} input - The input string to normalize.
* @returns The normalized string.
*/
private normalizeString;
}
//# sourceMappingURL=Systems.d.ts.map