-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from OneBusAway/release-please--branches--main…
…--changes--next release: 0.1.0-alpha.12
- Loading branch information
Showing
40 changed files
with
1,724 additions
and
133 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 | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
".": "0.1.0-alpha.11" | ||
".": "0.1.0-alpha.12" | ||
} |
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 | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
configured_endpoints: 17 | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit%2Fopen-transit-e1da29690ebfb4c6c07ede3d292a4f6babcd2202d6f3bb38bfa287ae04dfeb50.yml | ||
configured_endpoints: 21 | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit%2Fopen-transit-681949f64ed7ba8d43a08daba3e5dfcee447cecc48a0a03fcf2aedef3b656641.yml |
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
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from pprint import pprint | ||
|
||
from helpers.load_env import load_settings | ||
|
||
from onebusaway import OnebusawaySDK | ||
|
||
# Load settings from .env file, if it exists. If not, we'll use the | ||
# Puget Sound server URL (which is also the default in the SDK) and | ||
# the 'TEST' API key. | ||
settings = load_settings( | ||
{ | ||
"api_key": "TEST", | ||
"base_url": "https://api.pugetsound.onebusaway.org/", | ||
} | ||
) | ||
|
||
# Create a new instance of the OneBusAway SDK with the settings we loaded. | ||
oba = OnebusawaySDK(**settings) | ||
|
||
agency_id = "40" | ||
response = oba.routes_for_agency.list(agency_id) | ||
|
||
if response and response.data: | ||
pprint(response.data) |
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from helpers.load_env import load_settings | ||
|
||
from onebusaway import OnebusawaySDK | ||
|
||
# Load settings from .env file, if it exists. If not, we'll use the | ||
# Puget Sound server URL (which is also the default in the SDK) and | ||
# the 'TEST' API key. | ||
settings = load_settings( | ||
{ | ||
"api_key": "TEST", | ||
"base_url": "https://api.pugetsound.onebusaway.org/", | ||
} | ||
) | ||
|
||
# Create a new instance of the OneBusAway SDK with the settings we loaded. | ||
oba = OnebusawaySDK(**settings) | ||
|
||
agency_id = "40" # Link Light Rail in the Seattle area. | ||
|
||
route_ids = oba.route_ids_for_agency.list(agency_id) | ||
if route_ids.data and route_ids.data.list: | ||
for route_id in route_ids.data.list: | ||
print(route_id) |
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from helpers.load_env import load_settings | ||
|
||
from onebusaway import OnebusawaySDK | ||
|
||
# Load settings from .env file, if it exists. If not, we'll use the | ||
# Puget Sound server URL (which is also the default in the SDK) and | ||
# the 'TEST' API key. | ||
settings = load_settings( | ||
{ | ||
"api_key": "TEST", | ||
"base_url": "https://api.pugetsound.onebusaway.org/", | ||
} | ||
) | ||
|
||
# Create a new instance of the OneBusAway SDK with the settings we loaded. | ||
oba = OnebusawaySDK(**settings) | ||
|
||
route_id = "1_100224" | ||
response = oba.schedule_for_route.retrieve(route_id) | ||
if response and response.data: | ||
print(response.data.entry.stop_trip_groupings[0]) |
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
Oops, something went wrong.