Skip to content

ivorysoap/OCTranspo-API-Wrapper

Repository files navigation

OC Transpo API Wrapper 🚏 🚍

Build Status

⚠️ Under construction — Much like the O-Train Confederation Line itself, this is a constant work in progress and there's no saying for sure when it'll be done.

Overview

This is a wrapper for the OC Transpo API with some built-in features.

Originally, the goal ofthis project was to make a wrapper that provides the user more readability and ease of use than interfacing with the API directly. However, since the API's been updated, I'm working on some new goals, like creating a Bash command to make the API accessible from a terminal.

The oc.py script can be used to interface with the OC Transpo API. You give it a stop number, and it will give you either a summary of the upcoming trips for that stop, or just the formatted JSON that the API spits out when you give it a stop number (useful for debugging purposes).

Usage

$ python3 oc.py (app_id) (api_key) [-json]

where:

  • (app_id) is your Application ID
  • (api_key) is your API key
  • -json is an optional parameter - if you include it, you'll just get the API's JSON output. Otherwise, you get the regular bus stop summary.

Dependencies

You should be able to run oc.py by itself as long as you have the following

  • Python 3.7 and packages imported by oc.py
  • OC Transpo API credentials (you'll need to get these yourself)

About

Transit data — at your fingertips.

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages