Skip to content

Latest commit

 

History

History
56 lines (36 loc) · 1.38 KB

File metadata and controls

56 lines (36 loc) · 1.38 KB

🚗📊 LTA API Project

This remarkable project introduces a command-line interface (CLI) designed for seamless access to the Singapore Land Transport Authority (LTA) DataMall APIs. Uncover bus arrival details, parking availability, nearest bus stops, and even estimated travel time between two bus stops.

Installation 📦

  1. Clone the repository or download the project files.
  2. Use npm to install the required dependencies:
npm install

Usage 🛠️

Explore these commands at your fingertips:

  1. Fetch bus arrival information:
npm run arr
  1. Access parking availability data:
npm run parking
  1. Discover the nearest bus stops with latitude and longitude:
npm run nearest
  1. Estimate travel time between two bus stops:
npm run traveltime

Configuration ⚙️

To dive into the LTA DataMall API, secure an API key. Create a .env file in the project's root directory and set the LTA_API_KEY environment variable:

LTA_API_KEY=your_api_key_here

Replace your_api_key_here with your real LTA DataMall API key.

Dependencies 📦

  • axios - A promise-based HTTP client for Node.js
  • dotenv - Loads environment variables from a .env file
  • yargs - A Node.js command-line argument parser