https://github.com/agrison/monmet
Sauve les horaires du Met' à tes arrêts, consulte-les facilement.
https://github.com/agrison/monmet
Last synced: 2 months ago
JSON representation
Sauve les horaires du Met' à tes arrêts, consulte-les facilement.
- Host: GitHub
- URL: https://github.com/agrison/monmet
- Owner: agrison
- Created: 2014-09-01T03:46:32.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2015-07-21T10:50:54.000Z (almost 11 years ago)
- Last Synced: 2024-04-16T07:13:10.724Z (about 2 years ago)
- Language: JavaScript
- Homepage: http://monmet.dageeks.com
- Size: 10.3 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
MonMet
======
## MonMet
MonMet is a free mobile application that let user saves the time tables of his favorite bus stops
and have a quick look on them whenever he wants.
The application is composed of:
* A mobile application using ionic framework
* A backend using spring boot and redis.
## Screenshots
 
## Dependencies
* Java 8
* Maven 3+
* Redis
* ionic framework
* Tesseract (`brew install tesseract`) + Tesseract4j
* GhostScript (`brew install ghostscript`)
## Running the Backend
Run redis
```
redis-server
```
Init redis
```
cat src/main/resources/init.redis | redis-cli -x
```
Run the backend
```
mvn package
nohup java -jar target/MonMet*.jar &
```
Run the app on your computer
```
cd MonMet && ionic serve
```
Run the app on your device
```
cd MonMet && ionic run android
or
cd MonMet && ionic run ios
```
## REST API
| Method | Path | Description |
|:-------:| ---------------------------------------------------- | -----------------------------------------------------------|
| GET | /api/lines | Get the available lines bus lines. |
| GET | /api/lines/{lineId} | Get the available heads (directions) for a specific line |
| GET | /api/lines/{lineId}/{head} | Get the available stops for a specific line and head |
| GET | /api/tt/{lineId}/{head}/{stopId}?stopName={stopName} | Get the timetable for a specific line, head and stop |
| GET | /api/coords/{lineId}/{stopName} | Get the coordinates for a specific stop of a bus line. |
## Sample JSON
#### GET `/api/lines`
```json
{
"Mettis": [
{
"id": "998",
"name": "A",
},
{
"id": "999",
"name": "B",
}
],
...
}
```
#### GET `/api/lines/{lineId}`
```json
[
"CITE U",
"MATERNITE",
...
]
```
#### GET `/api/lines/{lineId}/{head}`
```json
[
{
"id": "21327",
"name": "REPUBLIQUE",
},
{
"id": "31329",
"name": "CITE U",
},
...
]
```
#### GET `/api/tt/{lineId}/{head}/{stopId}?stopName={stopName}(×tamp={timestamp})`
```json
{
"week": [
"05:18",
"05:36",
"06:10",
"06:28",
"06:43",
...
],
"saturday": [
"05:18",
"05:36",
"06:06",
"06:36",
...
],
"sunday": [
"05:18",
"06:36",
"07:12",
"08:05",
"08:35",
...
],
"nextRides": [
"19:06",
"19:16",
"19:26"
]
}
```
#### GET `/api/coords/{lineId}/{stopName}`
```json
{
"lat": 49.121565,
"lon": 6.175176
}
```