Skip to content

Simple API for Trasum in Indonesia with Google Maps API Integration

License

Notifications You must be signed in to change notification settings

benz-26/API-Transumindo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API-Transumindo

Train Station Location API

A simple API to check if a user has arrived at a specified train station, airport, bus station, or harbour in Indonesia.

Important Note

This API is created and deployed for educational purposes only.

Endpoints

1. Get Stations

Endpoint: /stations
Method: GET
Description: Retrieves a list of train stations, airports, bus stations, and harbours in Indonesia. This endpoint returns detailed information about various stations, including their name, latitude, longitude, and type.#### Response Example

2. Check Location

Endpoint: /check-location Method: POST Description: Checks if the user has arrived at the specified destination based on their current location.

Request Example

{
    "latitude": -6.200000,
    "longitude": 106.816666
}

Response Example

Success (200 OK)

"User has arrived at the destination"

Failure (404 Not Found)

"User is not at the destination"

Installation

Clone the repository:

git clone https://github.com/yourusername/API-Transumindo.git

cd API-Transumindo

Install dependencies:

go mod tidy

Run the server:

go run main.go

The server will start running at http://localhost:8080.

License

MIT

Contributing

Contributions are always welcome!

See contributing.md for ways to get started.

Please adhere to this project's code of conduct.

Releases

No releases published

Packages

No packages published

Languages