Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dlion/amatapikiss
A too KISS approach to serve APis
https://github.com/dlion/amatapikiss
Last synced: about 2 months ago
JSON representation
A too KISS approach to serve APis
- Host: GitHub
- URL: https://github.com/dlion/amatapikiss
- Owner: dlion
- Created: 2016-07-16T02:21:42.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-07-19T10:25:49.000Z (over 8 years ago)
- Last Synced: 2024-10-13T11:11:01.884Z (3 months ago)
- Language: JavaScript
- Homepage: https://domenicoluciani.com
- Size: 8.1 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Amat API Kiss
### I made this just for fun, don't use it in production
## Install
```sh
git clone https://github.com/dlion/amatAPIkiss
cd amatAPIkiss
npm install
```## Convert databases
```sh
cd db
unzip amat_feed_gtfs_v8.zip
node convert.js
```## Run
```
node index.js
```The sever will be started on `127.0.0.1:3000`
## Peculiarity
Just for fun I chose to use [lowdb](https://github.com/typicode/lowdb) so I don't use any type of Dbs, the json files in the db directory are enough. (I repeat, I made this just for fun)
So if you want to update your db or add a new routes you can do it adding a json file in the `db` directory.
The routes names are the name of the dbs present on the `db` directory so for example, if you have a `stocazzo.txt.json` file you will have a route called `/stocazzo`.
## Finder
Now you can find values using a key/value parameter; do you want to find shape_id "1010" in the shapes dataset ?
You can:
```sh
curl 127.0.0.1:3000/shapes/shape_id/1010
```## Example
Do you want to find stops that has wheelchair on board ?
```sh
curl 127.0.0.1:3000/stops/wheelchair_boarding/1
```## Author
[Domenico Luciani](https://domenicoluciani.com)
## License
MIT