Skip to content

Commit

Permalink
feat(examples): add example for testing api response
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmedhossamdev committed Jul 6, 2024
1 parent 446cafd commit 98d1952
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/agency.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import onebusaway


def main_sync():
client = onebusaway.OnebusawaySDK(api_key="TEST")
agency = client.agency.retrieve('1')
agency = client.agency.retrieve("1")

if agency.data and agency.data.entry:
print(agency.data.entry)
else:
print("Agency data or entry is None.")


if __name__ == "__main__":
print("Running synchronous main function:")
main_sync()
Expand Down

0 comments on commit 98d1952

Please sign in to comment.