Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
67 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,19 @@ | |||
Copyright (c) 2012 Darcy Laycock | |||
|
|||
Permission is hereby granted, free of charge, to any person obtaining a copy | |||
of this software and associated documentation files (the "Software"), to deal | |||
in the Software without restriction, including without limitation the rights | |||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |||
copies of the Software, and to permit persons to whom the Software is | |||
furnished to do so, subject to the following conditions: | |||
|
|||
The above copyright notice and this permission notice shall be included in | |||
all copies or substantial portions of the Software. | |||
|
|||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,3 +1,42 @@ | |||
# Transperth API v1.0 | # Transperth API | ||
|
|
||
Provides a simple api for dealing with transperth information at different locations. | This sample app is an example application for [RocketPants](https://github.com/filtersquad/rocket_pants) and makes use | ||
of ActiveRecord, RocketPants and API Smith for an API client. | |||
|
|||
## Getting Started | |||
|
|||
To get started, clone this repository and enter it. Next: | |||
|
|||
cp config/database.yml.sample config/database.yml | |||
# Edit the database.yml.sample | |||
rake db:create db:setup | |||
rails s | |||
|
|||
And next, visit: | |||
|
|||
- `http://localhost:3000/1/train_stations` - A list of all stations | |||
- `http://localhost:3000/1/bus_stops/12345` - The bus stop with stop number 12345. | |||
- `http://localhost:3000/1/smart_rider/12345` - The smart rider with id 12345. | |||
|
|||
## Contributing | |||
|
|||
We encourage all community contributions. Keeping this in mind, please follow these general guidelines when contributing: | |||
|
|||
* Fork the project | |||
* Create a topic branch for what you’re working on (git checkout -b awesome_feature) | |||
* Commit away, push that up (git push your\_remote awesome\_feature) | |||
* Create a new GitHub Issue with the commit, asking for review. Alternatively, send a pull request with details of what you added. | |||
* Once it’s accepted, if you want access to the core repository feel free to ask! Otherwise, you can continue to hack away in your own fork. | |||
|
|||
Other than that, our guidelines very closely match the GemCutter guidelines [here](http://wiki.github.com/qrush/gemcutter/contribution-guidelines). | |||
|
|||
(Thanks to [GemCutter](http://wiki.github.com/qrush/gemcutter/) for the contribution guide) | |||
|
|||
## License | |||
|
|||
Transperth API is released under the MIT License (see the [license file](LICENSE)) and is | |||
copyright Darcy Laycock, 2012. | |||
|
|||
This client is in no way affiliated with / endorsed by Transperth and is intended for education purposes only. Please note | |||
Transperth and it's associated terms are property of Transperth itself and there is no association between this | |||
code, myself and Transperth. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,9 +1,4 @@ | |||
# This file should contain all the record creation needed to seed the database with its default values. | puts "Setting all train stations up..." | ||
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). | TrainStation.seed! | ||
# | puts "Importing all bus stops..." | ||
# Examples: | BusStop.import! | ||
# | |||
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) | |||
# Mayor.create(name: 'Emanuel', city: cities.first) | |||
|
|||
TrainStation.seed! |