Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leoetlino/ratp-api
A modern API to get information from the RATP
https://github.com/leoetlino/ratp-api
Last synced: 27 days ago
JSON representation
A modern API to get information from the RATP
- Host: GitHub
- URL: https://github.com/leoetlino/ratp-api
- Owner: leoetlino
- License: agpl-3.0
- Created: 2015-09-23T17:53:08.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-07-12T03:14:12.000Z (over 1 year ago)
- Last Synced: 2023-08-03T05:00:19.276Z (over 1 year ago)
- Language: JavaScript
- Size: 1.37 MB
- Stars: 13
- Watchers: 4
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ratp-api
A modern API to get information from the RATP
## Requirements
- Node.js (at least 0.10)
- The RATP database extracted from the Android app## Setup
Clone the repo and then install the npm modules
(as well as bunyan, used for logs):```
git clone [email protected]:leoetlino/ratp-api
cd ratp-api
sudo npm -g install bunyan
npm install
```Copy the sqlite3 database extracted from the RATP official Android app
into the application root dir.
The database is not bundled to prevent legal issues.
**ratp-api requires the new (circa Jan 2020) database format.As of Jan 2020, in newer versions of the app, the database can be found at assets/databases/jenkins_ref.151.db in the APK. This name is likely automatically generated and the number is probably a version number that will change in newer app versions.
Finally, start the app:
```
node bootstrap.js | bunyan -o short -L
```## API documentation
The API is [documented in the wiki](https://github.com/leoetlino/ratp-api/wiki/API).
## Why a RATP API?
While the RATP has released some of their data, the official API is
pretty complex for basic, most useful endpoints, such as getting a list of
all stations, network-wide or on a specific line.And then there's the **refusal** to make the real-time next stops API
and data from the [SIEL](https://fr.wikipedia.org/wiki/SIEL_(m%C3%A9tro_de_Paris)) available
publicly. It even goes as far as threatening developers with legal action…This is for data that is supposed to be public, and
that is already available to the public. **Why?**Given that web scraping is forbidden, ratp-api does not rely on the website,
but instead directly uses the API that powers the Android app.
No reverse engineering was performed on the APK file.
Only traffic sniffing was done on my own device and my own network.Since I wanted a modern JSON API and there was none, I decided to
make my own and release it under an open-source license.## Contributing
Pull requests are welcome. When contributing code, make sure to follow
the existing code style and write clear commit messages.## Disclaimer
This software is only provided to make using the API and the
database easier; as such, it is *your* responsability to make sure
you are authorised to legally use the RATP API and the database.
I cannot be held liable if you use this software improperly,
violate any terms of service, or infringe copyright laws.This project is not affiliated with and/or endorsed by the [RATP](http://www.ratp.fr).
## License
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.