From 14232b4b8eb630e0e6f49bccd02e9ba7e3957ff7 Mon Sep 17 00:00:00 2001 From: athuler <22741115+athuler@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:05:20 -0400 Subject: [PATCH 01/14] Update version to 0.2.0 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b2f01dd..9f096be 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ with open("requirements.txt", "r") as fh: setup( name='PassioGo', - version="0.1.2", + version="0.2.0", description="An unofficial API for Passio Go", long_description=long_description, long_description_content_type='text/markdown', From 9b724dcefa654df7d577e2ac155d399280d6ce7c Mon Sep 17 00:00:00 2001 From: athuler <22741115+athuler@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:21:33 -0400 Subject: [PATCH 02/14] Create testing.yml --- .github/workflows/testing.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/testing.yml diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml new file mode 100644 index 0000000..f03fb0f --- /dev/null +++ b/.github/workflows/testing.yml @@ -0,0 +1,33 @@ +# This workflow runs pytest on various Python versions when there is a push + + +name: Testing Package + +on: push + + +permissions: + contents: read + +jobs: + deploy: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Test with pytest + run: | + pip install pytest pytest-cov + pytest \ No newline at end of file From b7dccb4b6a535aa6c42929bd306f85ab1b49b729 Mon Sep 17 00:00:00 2001 From: athuler <22741115+athuler@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:25:02 -0400 Subject: [PATCH 03/14] Update setup-python version --- .github/workflows/testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index f03fb0f..77ae680 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -20,7 +20,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies From 6c9ddce7d7e4a188c7f43a30445dc2a1fc27ea60 Mon Sep 17 00:00:00 2001 From: athuler <22741115+athuler@users.noreply.github.com> Date: Mon, 15 Jul 2024 15:35:35 -0400 Subject: [PATCH 04/14] TransportationSystem object & documentation --- .gitignore | 2 + README.md | 3 + docs/api.md | 52 +++++++++-- passiogo/__init__.py | 201 ++++++++++++++++++++++++++++++++++--------- 4 files changed, 212 insertions(+), 46 deletions(-) diff --git a/.gitignore b/.gitignore index 9efe358..b91ce57 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ /passiogo/__pycache__ /tests/__pycache__ +/.ipynb_checkpoints +Testing.ipynb diff --git a/README.md b/README.md index 20bc876..140df8c 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,12 @@ # Passio Go API +[![PyPI - Version](https://img.shields.io/pypi/v/passiogo?label=Latest%20Version&link=https%3A%2F%2Fpypi.org%2Fproject%2FPassioGo%2F)](https://pypi.org/project/PassioGo/) [![Pepy Total Downlods](https://img.shields.io/pepy/dt/PassioGo)](https://www.pepy.tech/projects/passiogo) [![Documentation Status](https://readthedocs.org/projects/passiogo/badge/?version=latest)](https://passiogo.readthedocs.io/en/latest/?badge=latest) + + An **unofficial** Python API for [Passio Go](https://passiogo.com/) allowing anyone to build transit-based applications for hundreds of Universities, Municipalities, Paratransit, and Airports. diff --git a/docs/api.md b/docs/api.md index 37ff646..753150c 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1,7 +1,48 @@ # API Reference -## `getAllRoutes` +## `TransportationSystem` + +- **id** (*int*): ID of the system +- **name** (*str*): The full name of the system +- **username** (*str*): URL-friendly system name +- **goAgencyName** (*str*): Display name of the system +- **email** (*str*): Contact email address for the system +- **goTestMode** (*bool*): Unknown +- **name2** (*bool*): Unknown +- **homepage** (*str*): URL to the agency's homepage +- **logo** (*bool*): Unknown +- **goRoutePlannerEnabled** (*bool*): Unknown +- **goColor** (*str*): Unknown +- **goSupportEmail** (*str*): Unknown +- **goSharedCode** (*int*): Unknown +- **goAuthenticationType** (*bool*): Unknown + + +## `getSystems()` + +Gets all systems supported by PassioGo. + +**Inputs**: + +- **appVersion** (*int*): Version of the application (Default: 2) +- **sortMode** (*int*): Unknown (Default: 1) + +**Returns**: *list* of [`TransportationSystem`](#transportationsystem) + + +## `printAllSystemsMd()` + +Prints all system names as a markdown list. + +**Input**: + +- **includeHtmlBreaks** (*bool*): Whether to include HTML line breaks (Default: True) + +**Returns**: None + + +## `getAllRoutes()` Obtains every route for the selected system. @@ -11,12 +52,11 @@ Obtains every route for the selected system. - **paramDigit**: - **amount**: -## `getAllStops` +## `getAllStops()` -## `getSystemAlerts` +## `getSystemAlerts()` + +## `getBuses()` -## `getBuses` -## `getSystems` -## `printAllSystemsMd` \ No newline at end of file diff --git a/passiogo/__init__.py b/passiogo/__init__.py index a75fe2f..9d3e6c0 100644 --- a/passiogo/__init__.py +++ b/passiogo/__init__.py @@ -1,10 +1,18 @@ +import json import requests import websocket -import json BASE_URL = "https://passiogo.com" +### Helper Functions ### + +def toIntInclNone(toInt): + if toInt == None: + return toInt + return(int(toInt)) + + def sendApiRequest(url, body): # Send Request @@ -25,6 +33,158 @@ def sendApiRequest(url, body): return(response) + +### Transportation Systems ### + + +class TransportationSystem: + + def __init__( + self, + id: int, + name: str = None, + username: str = None, + goAgencyName: str = None, + email: str = None, + goTestMode: bool = None, + name2: bool = None, + homepage: str = None, + logo: bool = None, + goRoutePlannerEnabled: bool = None, + goColor: str = None, + goSupportEmail: str = None, + goSharedCode: int = None, + goAuthenticationType: bool = None + ): + + self.id = id + self.name = name + self.username = username + self.goAgencyName = goAgencyName + self.email = email + self.goTestMode = goTestMode + self.name2 = name2 + self.homepage = homepage + self.logo = logo + self.goRoutePlannerEnabled = goRoutePlannerEnabled + self.goColor = goColor + self.goSupportEmail = goSupportEmail + self.goSharedCode = goSharedCode + self.goAuthenticationType = goAuthenticationType + + self.checkTypes() + + def checkTypes(self) -> None: + # id : int + assert type(self.id) == int, f"'id' parameter must be an int not {type(self.id)}" + + # name : str or None + assert (type(self.name) == str or self.name is None), f"'name' parameter must be a str not {type(self.name)}" + + # username : str or None + assert (type(self.username) == str or self.username is None), f"'username' parameter must be a str not {type(self.username)}" + + # goAgencyName : str or None + assert (type(self.goAgencyName) == str or self.goAgencyName is None), f"'goAgencyName' parameter must be a str not {type(self.goAgencyName)}" + + # email : str or None + assert (type(self.email) == str or self.email is None), f"'email' parameter must be a str not {type(self.email)}" + + # goTestMode : bool or None + assert (type(self.goTestMode) == bool or self.goTestMode is None), f"'goTestMode' parameter must be a bool not {type(self.goTestMode)}" + + # name2 : bool or None + assert (type(self.name2) == bool or self.name2 is None), f"'name2' parameter must be a bool not {type(self.name2)}" + + # homepage : str or None + assert (type(self.homepage) == str or self.homepage is None), f"'homepage' parameter must be a str not {type(self.homepage)}" + + # logo : bool or None + assert (type(self.logo) == bool or self.logo is None), f"'logo' parameter must be a bool not {type(self.logo)}" + + # goRoutePlannerEnabled : bool or None + assert (type(self.goRoutePlannerEnabled) == bool or self.goRoutePlannerEnabled is None), f"'goRoutePlannerEnabled' parameter must be a bool not {type(self.goRoutePlannerEnabled)}" + + # goColor : str or None + assert (type(self.goColor) == str or self.goColor is None), f"'goColor' parameter must be a str not {type(self.goColor)}" + + # goSupportEmail : str or None + assert (type(self.goSupportEmail) == str or self.goSupportEmail is None), f"'goSupportEmail' parameter must be a str not {type(self.goSupportEmail)}" + + # goSharedCode : int or None + assert (type(self.goSharedCode) == int or self.goSharedCode is None), f"'goSharedCode' parameter must be a int not {type(self.goSharedCode)}" + + # goAuthenticationType : bool or None + assert (type(self.goAuthenticationType) == bool or self.goAuthenticationType is None), f"'goAuthenticationType' parameter must be a bool not {type(self.goAuthenticationType)}" + + +def getSystems( + appVersion = 2, + sortMode = 1, +) -> list[TransportationSystem]: + ''' + Gets all systems. Returns a list of TransportationSystem. + + sortMode: Unknown + appVersion: + <2: Error + 2: Valid + ''' + + + # Initialize & Send Request + url = f"{BASE_URL}/mapGetData.php?getSystems={appVersion}&sortMode={sortMode}&credentials=1" + systems = sendApiRequest(url, None) + + + # Handle Request Error + if(systems == None): + return([]) + + + allSystems = [] + for system in systems["all"]: + + # Convert Empty Strings To None Objects + for parameter in system.keys(): + if system[parameter] == '': + system[parameter] = None + try: + allSystems.append(TransportationSystem( + id = int(system["id"]), + name = system["fullname"], + username = system["username"], + goAgencyName = system["goAgencyName"], + email = system["email"], + goTestMode = bool(int(system["goTestMode"])), + name2 = bool(int(system["name2"])), + homepage = system["homepage"], + logo = bool(int(system["logo"])), + goRoutePlannerEnabled = bool(int(system["goRoutePlannerEnabled"])), + goColor = system["goColor"], + goSupportEmail = system["goSupportEmail"], + goSharedCode = toIntInclNone(system["goSharedCode"]), + goAuthenticationType = bool(int(system["goAuthenticationType"])), + )) + except Exception as e: + print(e) + print(system) + return() + + + return(allSystems) + + +def printAllSystemsMd( + includeHtmlBreaks = True +): + systems = getSystems() + + for system in systems: + print(f"- {system.name}{'
' if includeHtmlBreaks else ''}") + + + def getAllRoutes( systemSelected, paramDigit = 1, @@ -156,45 +316,6 @@ def getBuses( return(buses) -def getSystems( - paramDigit = 2, - sortMode = 1, - deviceId = 43647468 -): - """ - Gets all system alerts for the selected system. - ========= - systemSelected: system from which to get content - paramDigit: - 0: Error - >=1: Valid - """ - - - # Initialize & Send Request - url = f"{BASE_URL}/mapGetData.php?getSystems={paramDigit}&sortMode={sortMode}&deviceId={deviceId}&credentials=1" - systems = sendApiRequest(url, None) - - - # Handle Request Error - if(systems == None): - return(None) - - - - return(systems) - - -def printAllSystemsMd( - paramDigit = 2, - sortMode = 1, - deviceId = 43647468, - includeHtml = True -): - systems = getSystems(paramDigit,sortMode,deviceId) - - for system in systems["all"]: - print(f"- {system['fullname']}{'
' if includeHtml else ''}") # Launch WebSocket From 1bb29416b658be15b20a5ec17ca06a40f81decd3 Mon Sep 17 00:00:00 2001 From: athuler <22741115+athuler@users.noreply.github.com> Date: Wed, 17 Jul 2024 17:01:45 -0400 Subject: [PATCH 05/14] Shift Most Things to OOP Most methods now operate as OOP --- README.md | 416 +++++++++++++++++++------------------ docs/api.md | 281 +++++++++++++++++++++++-- docs/examples.md | 3 + docs/usage.md | 18 -- mkdocs.yml | 2 +- passiogo/__init__.py | 482 ++++++++++++++++++++++++++++++++++--------- tests/test_main.py | 24 ++- 7 files changed, 874 insertions(+), 352 deletions(-) create mode 100644 docs/examples.md delete mode 100644 docs/usage.md diff --git a/README.md b/README.md index 140df8c..0eeddaf 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,10 @@ The package is available to download using [pip](https://pypi.org/project/Passio pip install passiogo ``` +## Usage + + + ## Documentation Project documentation for the latest stable version is available at [passiogo.readthedocs.io](https://passiogo.readthedocs.io/). Documentation for other versions is available at [passiogo.readthedocs.io/en/X.X.X](https://passiogo.readthedocs.io/en/0.1.2/). @@ -56,212 +60,212 @@ Collapsed below are all the transportation systems publicly available through th Last Updated: 2024/07/14

-- 3630 Peachtree
-- 5025 Apartments
-- 725 Ponce
-- Agnes Scott College
-- Alabama A&M University
-- Anne Arundel County Office of Transportation
-- Atlantic Station
-- AUC
-- Audible
-- Augusta University
-- Bayonne Bay
-- Beacon College
-- Beacon Shuttle
-- Beloit Transit
-- Bis-Man Transit
-- Bowie State University
-- Brockton Area Transit Authority (BAT)
-- Bull Runner at USF
-- Cal State San Bernardino
-- Canby Area Transit
-- Cascades East Transit
-- Casper Area Transit
-- Century Village (FT)
-- Chapman University
-- Charles River TMA
-- Charleston Airport REEF
-- Charm City Circulator
-- Chemung County (C-Tran)
-- CHOA
-- Citrus Connection
-- City of Arcadia
-- City of Bangor
-- City of Billings MET Transit
-- City of Cerritos
-- City of Clovis
-- City of Detroit - Employee Shuttle
-- City of Harrisonburg Department of Public Transportation (HDPT)
-- City of Hoboken
-- City of Irvine
-- City of Jackson (JTRAN)
-- City of Jacksonville
-- City of Monterey Park
-- City of Newport Beach (Balboa Peninsula Trolley)
-- City of Olean
-- City of Rosemead
-- City of Sandy
-- City of Tracy (MTM / Tracer Transit)
-- City of Tyler
-- City of Watertown (CitiBus)
-- Citylink Edmond
-- Citylink North (Kootenai County)
-- Citylink South
-- Clackamas County
-- Clemson Tiger Transit
-- Clemson University
-- Coca Cola
-- Colby College
-- Columbia University
-- Concho Valley Transit
-- Concord Kannapolis Area Transit
-- Concourse
-- Connect Douglas
-- Cooperative Alliance for Seacoast Transportation (COAST)
-- Coral Gables
-- CoryD (Test)
-- County Connector
-- CSULB
-- Disney Programs
-- District of Chamblee
-- Drury Plaza Hotel - Disney Springs
-- Eastern Kentucky University
-- Eastern Panhandle Transit Authority (EPTA)
-- Eastern Virginia Medical School
-- Elon University
-- Emory University
-- Endicott College
-- ES Atlanta
-- Escambia County Area Transit (ECAT)
-- ETHRA
-- EWR Employee Shuttle
-- EWR Port Authority NYNJ
-- FIT NY
-- Florham Park (Sun Valley/River Bend)
-- Florida Gulf Coast University (FGCU)
-- Florida International University
-- ForestView/Evergreen/Evergreen East
-- Fort Saskatchewan Transit (PWTransit Canada Ltd.)
-- Franklin Regional Transit Authority
-- Franklin Transit
-- Fresh Direct (Pro Park)
-- Fresno State University
-- GatewayJFK Connection
-- George Washington University (GW)
-- Georgia College & State University (GCSU)
-- Georgia Southern University
-- Georgia State University
-- Georgia Tech
-- GoBus
-- Harford County
-- Harris County Transit
-- HARTransit
-- Harvard University
-- Hendry County Transit System
-- Highland Hospital Metropolis
-- Hill Place Apartments
-- Hollins University
-- Houston Airport (SP+)
-- Hutch Metro Center
-- Interurban Trolley
-- Jasper Transit
-- JFK LGA Shuttles
-- Kentucky River Foothills
-- Key West Transit
-- Lawrence Transit
-- Lehigh University
-- Los Angeles International Airport (LAX)
-- Marymount University
-- Mayaguez (Skytec)
-- McAfee Knob Trailhead (Ridesource)
-- Mercy University
-- Metropolis Parking (Anschutz Campus)
-- Missouri State University
-- MIT
-- Montachusett Regional Transit Authority (MART)
-- National Cancer Institute
-- NC State University
-- New River Transit Authority
-- New York University
-- North Carolina A&T State University
-- North Fork Area Transit
-- Otter Bus (Ridesource)
-- Ozark Regional Transit
-- Palm Beach International Airport Parking Shuttle
-- Pepperdine University
-- Pittsburgh International Airport (PIT)
-- Port of Galveston (LAZ Parking)
-- Portage Area Regional Transit Authority (PARTA)
-- Providence College
-- Quinnipiac University
-- Radford Transit
-- Ravinia
-- River Valley Transit
-- River Valley Transit
-- Roadrunner Transit
-- Rochester Institute of Technology (RIT)
-- Roger Williams University
-- Rutgers University
-- Sacramento Airport Park & Ride
-- Saint Peter's University
-- Sales Demo - SR
-- Seneca Transit System
-- Sioux City Transit
-- SMART Transit
-- South Clackamas Transportation District
-- Southeastern Louisiana University
-- Southern Connecticut State University
-- St. Lawrence County Public Transit
-- St. Vincent's (Pinnacle Transportation Group)
-- State Shuttle (Onyx Equities)
-- STC Atlanta Georgia
-- Stevens Point - Central Transportation
-- Tennessee Technological University
-- Terraces (Pinnacle Transportation Group)
-- The Concord Trolley
-- The Cottages at Lake Tamaha Tuscaloosa
-- The Galleria (Reef Parking)
-- The Hartford
-- The U Apartments Raleigh
-- Township of West Orange
-- Towson Loop (Baltimore County)
-- Tulane University
-- Tuscaloosa Transit Authority
-- UARK (University of Arkansas)
-- UCONN/WRTD
-- UNC Charlotte
-- UNC Greensboro (UNCG)
-- UNC Wilmington
-- University at Buffalo
-- University of Alabama
-- University of Chicago
-- University of Florida (UF)
-- University of Georgia (UGA)
-- University of Hartford
-- University of Miami Medical Center (Reef Parking)
-- University of Michigan-Dearborn
-- University of Montana (ASUM)
-- University of New Haven
-- University of New Mexico (UNM)
-- University of North Georgia
-- University of Rochester
-- University of San Diego Tram Services
-- University of Texas at El Paso (UTEP)
-- University of Wisconsin-Milwaukee
-- Upper Cumberland Human Resource Agency (UCHRA)
-- Utah State University
-- Vanderbilt University
-- Vanderbilt University Medical Center
-- Via Mobility Services
-- VMware
-- Wake Forest University
-- WaterColor Community Association
-- West Midtown Shuttle
-- Western Carolina University
-- WestMar
-- Woodbridge Village/Gardens/Colonial
-- XChange at Secaucus Junction
+- 3630 Peachtree (#951)
+- 5025 Apartments (#1634)
+- 725 Ponce (#1832)
+- Agnes Scott College (#1471)
+- Alabama A&M University (#2456)
+- Anne Arundel County Office of Transportation (#3469)
+- Atlantic Station (#4349)
+- AUC (#67)
+- Audible (#876)
+- Augusta University (#553)
+- Bayonne Bay (#1808)
+- Beacon College (#3389)
+- Beacon Shuttle (#3561)
+- Beloit Transit (#3655)
+- Bis-Man Transit (#4121)
+- Bowie State University (#3001)
+- Brockton Area Transit Authority (BAT) (#2046)
+- Bull Runner at USF (#2343)
+- Cal State San Bernardino (#1187)
+- Canby Area Transit (#3274)
+- Cascades East Transit (#2460)
+- Casper Area Transit (#4055)
+- Century Village (FT) (#444)
+- Chapman University (#263)
+- Charles River TMA (#5019)
+- Charleston Airport REEF (#4749)
+- Charm City Circulator (#3554)
+- Chemung County (C-Tran) (#4009)
+- CHOA (#3489)
+- Citrus Connection (#1752)
+- City of Arcadia (#3304)
+- City of Bangor (#4631)
+- City of Billings MET Transit (#3901)
+- City of Cerritos (#2282)
+- City of Clovis (#3743)
+- City of Detroit - Employee Shuttle (#1275)
+- City of Harrisonburg Department of Public Transportation (HDPT) (#2868)
+- City of Hoboken (#466)
+- City of Irvine (#4502)
+- City of Jackson (JTRAN) (#3363)
+- City of Jacksonville (#3521)
+- City of Monterey Park (#3215)
+- City of Newport Beach (Balboa Peninsula Trolley) (#4883)
+- City of Olean (#2084)
+- City of Rosemead (#3670)
+- City of Sandy (#3183)
+- City of Tracy (MTM / Tracer Transit) (#2996)
+- City of Tyler (#3777)
+- City of Watertown (CitiBus) (#2775)
+- Citylink Edmond (#4662)
+- Citylink North (Kootenai County) (#2016)
+- Citylink South (#2059)
+- Clackamas County (#3205)
+- Clemson Tiger Transit (#1654)
+- Clemson University (#793)
+- Coca Cola (#416)
+- Colby College (#3377)
+- Columbia University (#74)
+- Concho Valley Transit (#3281)
+- Concord Kannapolis Area Transit (#4124)
+- Concourse (#1841)
+- Connect Douglas (#1661)
+- Cooperative Alliance for Seacoast Transportation (COAST) (#2962)
+- Coral Gables (#2787)
+- CoryD (Test) (#829)
+- County Connector (#2933)
+- CSULB (#4163)
+- Disney Programs (#2208)
+- District of Chamblee (#1897)
+- Drury Plaza Hotel - Disney Springs (#4748)
+- Eastern Kentucky University (#3828)
+- Eastern Panhandle Transit Authority (EPTA) (#1298)
+- Eastern Virginia Medical School (#591)
+- Elon University (#3045)
+- Emory University (#4432)
+- Endicott College (#2873)
+- ES Atlanta (#2280)
+- Escambia County Area Transit (ECAT) (#2283)
+- ETHRA (#4583)
+- EWR Employee Shuttle (#2989)
+- EWR Port Authority NYNJ (#2496)
+- FIT NY (#973)
+- Florham Park (Sun Valley/River Bend) (#2311)
+- Florida Gulf Coast University (FGCU) (#2281)
+- Florida International University (#4119)
+- ForestView/Evergreen/Evergreen East (#1641)
+- Fort Saskatchewan Transit (PWTransit Canada Ltd.) (#912)
+- Franklin Regional Transit Authority (#2771)
+- Franklin Transit (#1652)
+- Fresh Direct (Pro Park) (#4691)
+- Fresno State University (#805)
+- GatewayJFK Connection (#2125)
+- George Washington University (GW) (#4120)
+- Georgia College & State University (GCSU) (#895)
+- Georgia Southern University (#137)
+- Georgia State University (#480)
+- Georgia Tech (#76)
+- GoBus (#1839)
+- Harford County (#4620)
+- Harris County Transit (#3497)
+- HARTransit (#2250)
+- Harvard University (#831)
+- Hendry County Transit System (#2217)
+- Highland Hospital Metropolis (#3829)
+- Hill Place Apartments (#1092)
+- Hollins University (#3014)
+- Houston Airport (SP+) (#4919)
+- Hutch Metro Center (#1569)
+- Interurban Trolley (#3639)
+- Jasper Transit (#4294)
+- JFK LGA Shuttles (#2494)
+- Kentucky River Foothills (#3630)
+- Key West Transit (#4440)
+- Lawrence Transit (#4834)
+- Lehigh University (#1090)
+- Los Angeles International Airport (LAX) (#1421)
+- Marymount University (#4716)
+- Mayaguez (Skytec) (#3206)
+- McAfee Knob Trailhead (Ridesource) (#3069)
+- Mercy University (#694)
+- Metropolis Parking (Anschutz Campus) (#3282)
+- Missouri State University (#459)
+- MIT (#94)
+- Montachusett Regional Transit Authority (MART) (#2173)
+- National Cancer Institute (#3293)
+- NC State University (#3827)
+- New River Transit Authority (#3362)
+- New York University (#1007)
+- North Carolina A&T State University (#261)
+- North Fork Area Transit (#2587)
+- Otter Bus (Ridesource) (#3015)
+- Ozark Regional Transit (#1589)
+- Palm Beach International Airport Parking Shuttle (#1071)
+- Pepperdine University (#3593)
+- Pittsburgh International Airport (PIT) (#3200)
+- Port of Galveston (LAZ Parking) (#3294)
+- Portage Area Regional Transit Authority (PARTA) (#3420)
+- Providence College (#4147)
+- Quinnipiac University (#3899)
+- Radford Transit (#1248)
+- Ravinia (#1593)
+- River Valley Transit (#1726)
+- River Valley Transit (#5168)
+- Roadrunner Transit (#4010)
+- Rochester Institute of Technology (RIT) (#4006)
+- Roger Williams University (#1850)
+- Rutgers University (#1268)
+- Sacramento Airport Park & Ride (#898)
+- Saint Peter's University (#493)
+- Sales Demo - SR (#5047)
+- Seneca Transit System (#2035)
+- Sioux City Transit (#4832)
+- SMART Transit (#4476)
+- South Clackamas Transportation District (#4233)
+- Southeastern Louisiana University (#186)
+- Southern Connecticut State University (#431)
+- St. Lawrence County Public Transit (#4234)
+- St. Vincent's (Pinnacle Transportation Group) (#2561)
+- State Shuttle (Onyx Equities) (#2780)
+- STC Atlanta Georgia (#2197)
+- Stevens Point - Central Transportation (#2556)
+- Tennessee Technological University (#1736)
+- Terraces (Pinnacle Transportation Group) (#3270)
+- The Concord Trolley (#3089)
+- The Cottages at Lake Tamaha Tuscaloosa (#1093)
+- The Galleria (Reef Parking) (#1900)
+- The Hartford (#4581)
+- The U Apartments Raleigh (#1650)
+- Township of West Orange (#3166)
+- Towson Loop (Baltimore County) (#2153)
+- Tulane University (#353)
+- Tuscaloosa Transit Authority (#3817)
+- UARK (University of Arkansas) (#3778)
+- UCONN/WRTD (#1541)
+- UNC Charlotte (#1053)
+- UNC Greensboro (UNCG) (#2874)
+- UNC Wilmington (#3952)
+- University at Buffalo (#4882)
+- University of Alabama (#240)
+- University of Chicago (#1068)
+- University of Florida (UF) (#3826)
+- University of Georgia (UGA) (#3994)
+- University of Hartford (#3305)
+- University of Miami Medical Center (Reef Parking) (#4201)
+- University of Michigan-Dearborn (#1481)
+- University of Montana (ASUM) (#4041)
+- University of New Haven (#3900)
+- University of New Mexico (UNM) (#2156)
+- University of North Georgia (#646)
+- University of Rochester (#3214)
+- University of San Diego Tram Services (#3444)
+- University of Texas at El Paso (UTEP) (#2383)
+- University of Wisconsin-Milwaukee (#728)
+- Upper Cumberland Human Resource Agency (UCHRA) (#2875)
+- Utah State University (#3499)
+- Vanderbilt University (#3622)
+- Vanderbilt University Medical Center (#1332)
+- Via Mobility Services (#4729)
+- VMware (#1274)
+- Wake Forest University (#3669)
+- WaterColor Community Association (#4842)
+- West Midtown Shuttle (#4473)
+- Western Carolina University (#2597)
+- WestMar (#1091)
+- Woodbridge Village/Gardens/Colonial (#1642)
+- XChange at Secaucus Junction (#432)

\ No newline at end of file diff --git a/docs/api.md b/docs/api.md index 753150c..6147a60 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1,8 +1,56 @@ # API Reference +## `getSystems()` + +Gets all systems supported by PassioGo. + +**Inputs**: + +- **appVersion** (*int*): Version of the application (Default: 2) +- **sortMode** (*int*): Unknown (Default: 1) + +**Returns**: *list* of [`TransportationSystem`](#transportationsystem) + +```python +passiogo.getSystems() +``` + +``` +[, + , + , + ... + , + ] +``` + +## `getSystemFromID()` + +Gets the system with the corresponding id. If there is no match, returns *None*. + +**Inputs**: + +- **appVersion** (*int*): Version of the application (Default: 2) +- **sortMode** (*int*): Unknown (Default: 1) + +**Returns**: [`TransportationSystem`](#transportationsystem) or *None* if no match + +```python +passiogo.getSystemFromID(1068) +``` + +``` + +``` + + ## `TransportationSystem` +### `TransportationSystem.__init__()` + +**id** is the only required parameter, all other default to *None*. + - **id** (*int*): ID of the system - **name** (*str*): The full name of the system - **username** (*str*): URL-friendly system name @@ -18,18 +66,216 @@ - **goSharedCode** (*int*): Unknown - **goAuthenticationType** (*bool*): Unknown +### `TransportationSystem.getRoutes()` -## `getSystems()` +Get all routes for the appropriate system. -Gets all systems supported by PassioGo. +**Input**: + +- **appVersion** (*int*): Version of the application (Default: 1) +- **amount** (*int*): Unknown (Default: 1) + +**Output**: *List* of [`Route`](#route) + +```python +passiogo.getSystemFromID(1068).getRoutes() +``` + +``` +[, + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ] +``` + +### `TransportationSystem.getStops()` + +Gets all stops for the given transportation system. **Inputs**: - **appVersion** (*int*): Version of the application (Default: 2) -- **sortMode** (*int*): Unknown (Default: 1) +- **sA** (*int*): Unknown (Default: 1) -**Returns**: *list* of [`TransportationSystem`](#transportationsystem) +**Output**: *List* of [`Stop`](#stop) +```python +passiogo.getSystemFromID(1068).getStops() +``` + +``` +[, + , + , + , + , + , + , + , + , + ... + ] +``` + +### `TransportationSystem.getSystemAlerts()` + +Gets all alerts for the corresponding transportation system. + +**Inputs**: + +- **appVersion** (*int*): Version of the application (Default: 1) +- **amount** (*int*): Unknown (Default: 1) +- **routesAmount** (*int*): Unknown (Default: 1) + +**Output**: *List* of [`SystemAlert`](#systemalert) + +```python +passiogo.getSystemFromID(1068).getSystemAlerts() +``` + +``` +[, + , + , + ] +``` + +## `Route` + +### `Route.__init__()` + +**id** is the only required parameter, all other default to *None*. + +- **id** (*int*): ID of the route +- **groupId** (*int*): Unknown +- **groupColor** (*str*): Unknown +- **name** (*str*): Name of the route +- **shortName** (*str*): Short name / abbreviation of the route +- **nameOrig** (*str*): Unknown +- **fullname** (*str*): Unknown +- **myid** (*int*): Unknown +- **mapApp** (*bool*): Unknown +- **archive** (*bool*): Unknown +- **goPrefixRouteName** (*bool*): Unknown +- **goShowSchedule** (*bool*): Unknown +- **outdated** (*bool*): Unknown +- **distance** (*int*): Unknown +- **latitude** (*float*): Unknown +- **longitude** (*float*): Unknown +- **timezone** (*str*): Timezone of the route +- **serviceTime** (*str*): Route Schedule +- **serviceTimeShort** (*str*): Route Schedule +- **systemId** (*int*): ID of the transportation system +- **system** (*[`TransportationSystem`](#transportationsystem)*): transportation system object + +### `Route.getStops()` + +Gets the list of stops for this route and stores it as an argument + +**Output**: *List* of [`Stop`](#stop) + + +## `Stop` + +### `Stop.__init__()` + +**id** is the only required parameter, all other default to *None*. + +- **id** (*int*): ID of the stop +- **routeId** (*int*): ID of the route +- **systemId** (*int*): ID of the transportation system +- **position** (*int*): Unknown +- **name** (*str*): Name of the stop +- **latitude** (*float*): Latitude of the stop +- **longitude** (*float*): Longitude of the stop +- **radius** (*int*): Unknown +- **routeName** (*str*): Name of the route +- **routeShortname** (*str*): Short Name / Abbreviation of the route +- **routeGroupId** (*int*): Unknown +- **system** (*[`TransportationSystem`](#transportationsystem)*): Transportation system object +- **route** (*[`Route`](#route)*): Route object + + +## `SystemAlert` + +### `SystemAlert.__init__()` + +**id** is the only required parameter, all other default to *None*. + +- **id** (*int*): ID of the alert +- **systemId** (*int*): ID of the system +- **system** (*[`TransportationSystem`](#transportationsystem)*): Transportation System object +- **routeId** (*int*): Route ID this alert relates to +- **name** (*str*): Name/Title of the alert +- **html** (*str*): Content of the alert in HTML format +- **archive** (*bool*): Unknown +- **important** (*bool*): Unknown +- **dateTimeCreated** (*str*): Date and time when the alert was created +- **dateTimeFrom** (*str*): Start date and time from which the alert is in effect +- **dateTimeTo** (*str*): End date and time from which the alert is in effect +- **asPush** (*bool*): Unknown +- **gtfs** (*bool*): Unknown +- **gtfsAlertCauseId** (*bool*): Unknown +- **gtfsAlertEffectId** (*bool*): Unknown +- **gtfsAlertUrl** (*str*): Unknown +- **gtfsAlertHeaderText** (*str*): Name/Title of the alert in text format +- **gtfsAlertDescriptionText** (*str*): Content of the alert in text format +- **routeGroupId** (*int*): Unknown +- **createdUtc** (*str*): Date and time when the alert was created in UTC +- **authorId** (*int*): User ID of the author +- **author** (*str*): Name and email of the author +- **updated** (*str*): Date and time when the alert was updated +- **updateAuthorId** (*int*): User ID of the author of the update +- **updateAuthor** (*str*): Name and email of the author of the update +- **createdF** (*str*): Human friendly date and time when the alert was created +- **fromF** (*str*): Human friendly start date and time of the alert +- **fromOk** (*bool*): Unknown +- **toOk** (*bool*): Unknown + +```json +{'id': '27926', + 'systemId': '1068', + 'system': , + 'routeId': '38731', + 'name': 'Midway Metra Reroute', + 'html': 'Due to road reconstruction at 60th & Stony Island, Midway Metra will detour to Dorchester Ave., bypassing the parking lot at Stony Island. The new stop for the parking lot is on the Midway EB, across from the Stony Island Parking Lot.', + 'archive': '0', + 'important': '1', + 'dateTimeCreated': '2024-04-18 10:17:44', + 'dateTimeFrom': '2024-07-12 06:10:34', + 'dateTimeTo': '2024-07-30 22:15:34', + 'asPush': '1', + 'gtfs': '1', + 'gtfsAlertCauseId': None, + 'gtfsAlertEffectId': None, + 'gtfsAlertUrl': None, + 'gtfsAlertHeaderText': 'Midway Metra Reroute', + 'gtfsAlertDescriptionText': 'Due to road reconstruction at 60th Stony Island, Midway Metra will detour to Dorchester Ave., bypassing the parking lot at Stony Island. The new stop for the parking lot is on the Midway EB, across from the Stony Island Parking Lot.', + 'routeGroupId': None, + 'createdUtc': '2024-04-18 15:17:44', + 'authorId': '1217', + 'author': 'John Appleseed (sample@email.com)', + 'updated': '2024-07-12 06:09:22', + 'updateAuthorId': '1202', + 'updateAuthor': 'John Appleseed (sample@email.com)', + 'createdF': 'Friday, July 12th, 2024 6:10 AM', + 'fromF': 'Friday, July 12th, 2024 6:10 AM', + 'fromOk': '1', + 'toOk': '1'} +``` ## `printAllSystemsMd()` @@ -41,22 +287,19 @@ Prints all system names as a markdown list. **Returns**: None +```python +passiogo.printAllSystemsMd() +``` + +```md +- 3630 Peachtree (#951)
+- 5025 Apartments (#1634)
+- 725 Ponce (#1832)
+- Agnes Scott College (#1471)
+... +``` + -## `getAllRoutes()` - -Obtains every route for the selected system. - -**getAllRoutes**(systemSelected = 1068, paramDigit = 1, amount = 1) - -- **systemSelected**: -- **paramDigit**: -- **amount**: - -## `getAllStops()` - -## `getSystemAlerts()` - -## `getBuses()` diff --git a/docs/examples.md b/docs/examples.md new file mode 100644 index 0000000..2bbe1ee --- /dev/null +++ b/docs/examples.md @@ -0,0 +1,3 @@ + +# Examples + diff --git a/docs/usage.md b/docs/usage.md deleted file mode 100644 index 58a6e9e..0000000 --- a/docs/usage.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Usage - -## Installation - -Install using pip - -``` -pip install passiogo -``` - -## Identify Transportation System - -Before you can do anything, you will need to identify the `id` of the transportation system you are interested in querying. - -```python - -``` \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 5bffbc7..be35635 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -7,7 +7,7 @@ site_author: Andrei Thüler nav: - Home: index.md - - Usage: usage.md + - Examples: examples.md - API Reference: api.md - Changelog: changelog.md diff --git a/passiogo/__init__.py b/passiogo/__init__.py index 9d3e6c0..dbb2abd 100644 --- a/passiogo/__init__.py +++ b/passiogo/__init__.py @@ -116,7 +116,188 @@ class TransportationSystem: # goAuthenticationType : bool or None assert (type(self.goAuthenticationType) == bool or self.goAuthenticationType is None), f"'goAuthenticationType' parameter must be a bool not {type(self.goAuthenticationType)}" + + def getRoutes( + self, + appVersion = 1, + amount = 1 + ): + """ + Obtains every route for the selected system. + ========= + systemSelected: system from which to get content + paramDigit: does not affect content of response, only formatting + amount: + 1: Returns all routes for given system + 0: Not Valid, Gives Error + >=2: Returns all routes for given system in addition to unrelated routes. Exact methodology unsure. + """ + + + # Initialize & Send Request + url = BASE_URL+f"/mapGetData.php?getRoutes={appVersion}" + body = { + "systemSelected0" : str(self.id), + "amount" : amount + } + routes = sendApiRequest(url, body) + + # Handle Request Error + if(routes == None): + return(None) + + # Handle Differing Response Format + if "all" in routes: + routes = routes["all"] + + allRoutes = [] + + for route in routes: + possibleKeys = ["id", "groupId", "groupColor", "name", "shortName", "nameOrig", "fullname", "myid", "mapApp", "archive", "goPrefixRouteName", "goShowSchedule", "outdated", "distance", "latitude", "longitude", "timezone", "serviceTime", "serviceTimeShort"] + + for possibleKey in possibleKeys: + if possibleKey not in route.keys(): + route[possibleKey] = None + + allRoutes.append(Route( + id = route["id"], + groupId = route["groupId"], + groupColor = route["groupColor"], + name = route["name"], + shortName = route["shortName"], + nameOrig = route["nameOrig"], + fullname = route["fullname"], + myid = route["myid"], + mapApp = route["mapApp"], + archive = route["archive"], + goPrefixRouteName = route["goPrefixRouteName"], + goShowSchedule = route["goShowSchedule"], + outdated = route["outdated"], + distance = route["distance"], + latitude = route["latitude"], + longitude = route["longitude"], + timezone = route["timezone"], + serviceTime = route["serviceTime"], + serviceTimeShort = route["serviceTimeShort"], + systemId = int(route["userId"]), + system = self + )) + + return(allRoutes) + + def getStops( + self, + appVersion = 2, + sA = 1 + ): + """ + Obtains all stop for the given system. + ========= + appVersion: No discernable change + sA: + 0: error + 1: Returns all stops for the given system + >=2: Returns unrelated stops as well + """ + + + # Initialize & Send Request + url = BASE_URL+"/mapGetData.php?getStops="+str(appVersion) + body = { + "s0" : str(self.id), + "sA" : sA + } + stops = sendApiRequest(url, body) + + # Handle Request Error + if(stops == None): + return(None) + + # Create Stop Objects + allStops = [] + for id, stop in stops["stops"].items(): + allStops.append(Stop( + id = stop["stopId"], + routeId = stop["routeId"], + systemId = stop["userId"], + position = stop["position"], + name = stop["name"], + latitude = stop["latitude"], + longitude = stop["longitude"], + radius = stop["radius"], + routeName = stop["routeName"], + routeShortname = stop["routeShortname"], + routeGroupId = stop["routeGroupId"], + )) + + return(allStops) + + def getSystemAlerts( + self, + appVersion = 1, + amount = 1, + routesAmount = 0 + ): + """ + Gets all system alerts for the selected system. + ========= + systemSelected: system from which to get content + appVersion: + 0: Error + >=1: Valid + """ + + + # Initialize & Send Request + url = BASE_URL+f"/goServices.php?getAlertMessages={appVersion}" + body = { + "systemSelected0" : str(self.id), + "amount" : amount, + "routesAmount":routesAmount + } + errorMsgs = sendApiRequest(url, body) + + # Handle Request Error + if(errorMsgs == None): + return(None) + + # Create SystemAlert Objects + allAlerts = [] + for errorMsg in errorMsgs["msgs"]: + allAlerts.append(SystemAlert( + id = errorMsg["id"], + systemId = errorMsg["userId"], + system = self, + routeId = errorMsg["routeId"], + name = errorMsg["name"], + html = errorMsg["html"], + archive = errorMsg["archive"], + important = errorMsg["important"], + dateTimeCreated = errorMsg["created"], + dateTimeFrom = errorMsg["from"], + dateTimeTo = errorMsg["to"], + asPush = errorMsg["asPush"], + gtfs = errorMsg["gtfs"], + gtfsAlertCauseId = errorMsg["gtfsAlertCauseId"], + gtfsAlertEffectId = errorMsg["gtfsAlertEffectId"], + gtfsAlertUrl = errorMsg["gtfsAlertUrl"], + gtfsAlertHeaderText = errorMsg["gtfsAlertHeaderText"], + gtfsAlertDescriptionText = errorMsg["gtfsAlertDescriptionText"], + routeGroupId = errorMsg["routeGroupId"], + createdUtc = errorMsg["createdUtc"], + authorId = errorMsg["authorId"], + author = errorMsg["author"], + updated = errorMsg["updated"], + updateAuthorId = errorMsg["updateAuthorId"], + updateAuthor = errorMsg["updateAuthor"], + createdF = errorMsg["createdF"], + fromF = errorMsg["fromF"], + fromOk = errorMsg["fromOk"], + toOk = errorMsg["toOk"], + )) + + return(allAlerts) def getSystems( appVersion = 2, @@ -175,116 +356,218 @@ def getSystems( return(allSystems) +def getSystemFromID( + id, + appVersion = 2, + sortMode = 1, +) -> TransportationSystem: + + # Check Input Type + assert type(id) == int, "`id` must be of type int" + + # Check App Version Type + assert type(appVersion) == int, "`appVersion` must be of type int" + + # Check sort Mode Type + assert type(sortMode) == int, "`sortMode` must be of type int" + + systems = getSystems(appVersion,sortMode) + + for system in systems: + if system.id == id: + return system + return None + + def printAllSystemsMd( includeHtmlBreaks = True ): systems = getSystems() for system in systems: - print(f"- {system.name}{'
' if includeHtmlBreaks else ''}") + print(f"- {system.name} (#{system.id}){'
' if includeHtmlBreaks else ''}") + + +### Routes ### + +class Route: + + def __init__( + self, + id: int, + groupId: int = None, + groupColor: str = None, + name: str = None, + shortName: str = None, + nameOrig: str = None, + fullname: str = None, + myid: int = None, + mapApp: bool = None, + archive: bool = None, + goPrefixRouteName: bool = None, + goShowSchedule: bool = None, + outdated: bool = None, + distance: int = None, + latitude: float = None, + longitude: float = None, + timezone: str = None, + serviceTime: str = None, + serviceTimeShort: str = None, + systemId: id = None, + system: TransportationSystem = None, + stops: list = None, + + ): + self.id = id + self.groupId = groupId + self.groupColor = groupColor + self.name = name + self.shortName = shortName + self.nameOrig = nameOrig + self.fullname = fullname + self.myid = myid + self.mapApp = mapApp + self.archive = archive + self.goPrefixRouteName = goPrefixRouteName + self.goShowSchedule = goShowSchedule + self.outdated = outdated + self.distance = distance + self.latitude = latitude + self.longitude = longitude + self.serviceTime = serviceTime + self.serviceTimeShort = serviceTimeShort + self.systemId = systemId + self.system = system + self.stops = stops + + if self.stops is None: + self.stops = [] + + def getStops(self): + """ + Gets the list of stops for this route and stores it as an argument + """ + ... + + + +### Stops ### + +class Stop: + + def __init__( + self, + id: int, + routeId: int = None, + systemId: int = None, + position: int = None, + name: str = None, + latitude: float = None, + longitude: float = None, + radius: int = None, + routeName: str = None, + routeShortname: str = None, + routeGroupId : int = None, + system : TransportationSystem = None, + route : Route = None, + ): + self.id = id + self.routeId = routeId + self.systemId = systemId + self.position = position + self.name = name + self.latitude = latitude + self.longitude = longitude + self.radius = radius + self.routeName = routeName + self.routeShortname = routeShortname + self.routeGroupId = routeGroupId + self.system = system + self.route = route + + + def getRoute(self): + """ + Get the route object to which this route belongs. + """ + ... + + def getSystem(self): + """ + Get the system object to which this route belongs. + """ + ... -def getAllRoutes( - systemSelected, - paramDigit = 1, - amount = 1 -): - """ - Obtains every route for the selected system. - ========= - systemSelected: system from which to get content - paramDigit: does not affect content of response, only formatting - amount: - 1: Returns all routes for given system - 0: Not Valid, Gives Error - >=2: Returns all routes for given system in addition to unrelated routes. Exact methodology unsure. - """ +### System Alerts ### + +class SystemAlert: - - # Initialize & Send Request - url = BASE_URL+"/mapGetData.php?getRoutes="+str(paramDigit) - body = { - "systemSelected0" : str(systemSelected), - "amount" : amount - } - routes = sendApiRequest(url, body) - - # Handle Request Error - if(routes == None): - return(None) - - # Handle Differing Response Format - if "all" in routes: - routes = routes["all"] - - - return(routes) + def __init__( + self, + id: int, + systemId: int = None, + system: TransportationSystem = None, + routeId: int = None, + name: str = None, + html: str = None, + archive: bool = None, + important: bool = None, + dateTimeCreated: str = None, + dateTimeFrom: str = None, + dateTimeTo: str = None, + asPush: bool = None, + gtfs: bool = None, + gtfsAlertCauseId: id = None, + gtfsAlertEffectId: id = None, + gtfsAlertUrl: str = None, + gtfsAlertHeaderText: str = None, + gtfsAlertDescriptionText: str = None, + routeGroupId: int = None, + createdUtc: str = None, + authorId: int = None, + author: str = None, + updated: str = None, + updateAuthorId: int = None, + updateAuthor: str = None, + createdF: str = None, + fromF: str = None, + fromOk: bool = None, + toOk: bool = None, + ): + self.id = id + self.systemId = systemId + self.system = system + self.routeId = routeId + self.name = name + self.html = html + self.archive = archive + self.important = important + self.dateTimeCreated = dateTimeCreated + self.dateTimeFrom = dateTimeFrom + self.dateTimeTo = dateTimeTo + self.asPush = asPush + self.gtfs = gtfs + self.gtfsAlertCauseId = gtfsAlertCauseId + self.gtfsAlertEffectId = gtfsAlertEffectId + self.gtfsAlertUrl = gtfsAlertUrl + self.gtfsAlertHeaderText = gtfsAlertHeaderText + self.gtfsAlertDescriptionText = gtfsAlertDescriptionText + self.routeGroupId = routeGroupId + self.createdUtc = createdUtc + self.authorId = authorId + self.author = author + self.updated = updated + self.updateAuthorId = updateAuthorId + self.updateAuthor = updateAuthor + self.createdF = createdF + self.fromF = fromF + self.fromOk = fromOk + self.toOk = toOk + -def getAllStops( - systemSelected, - paramDigit = 2, - sA = 1, - debug = 0 -): - """ - Obtains all stop for the selected system. - ========= - systemSelected: system from which to get content - paramDigit: No discernable change - sA: - 0: error - 1: Returns all stops for the given system - >=2: Returns unrelated stops as well - """ - - - # Initialize & Send Request - url = BASE_URL+"/mapGetData.php?getStops="+str(paramDigit) - body = { - "s0" : str(systemSelected), - "sA" : sA - } - stops = sendApiRequest(url, body) - - # Handle Request Error - if(stops == None): - return(None) - - return(stops) - - -def getSystemAlerts( - systemSelected, - paramDigit = 1 -): - """ - Gets all system alerts for the selected system. - ========= - systemSelected: system from which to get content - paramDigit: - 0: Error - >=1: Valid - """ - - - # Initialize & Send Request - url = BASE_URL+"/goServices.php?getAlertMessages="+str(paramDigit) - body = { - "systemSelected0" : str(systemSelected), - "amount" : 1, - "routesAmount":0 - } - errorMsg = sendApiRequest(url, body) - - - # Handle Request Error - if(errorMsg == None): - return(None) - - - return(errorMsg) def getBuses( @@ -316,7 +599,8 @@ def getBuses( return(buses) - +### Live Timings ### +## Not Yet Supported! ## # Launch WebSocket def launchWS(): diff --git a/tests/test_main.py b/tests/test_main.py index 940d076..7de1639 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -1,19 +1,25 @@ import passiogo +def test_getAllSystems(): + passiogo.getSystems + + +def test_printAllSystems(): + passiogo.printAllSystemsMd() + +def test_getSystemFromId(): + global testSystem + testSystem = passiogo.getSystemFromID(1068) + def test_getAllRoutes(): - passiogo.getAllRoutes(1068) + testSystem.getRoutes() def test_getAllStops(): - passiogo.getAllStops(1068) + testSystem.getStops() def test_getSystemAlerts(): - passiogo.getSystemAlerts(1068) + testSystem.getSystemAlerts() def test_getBuses(): passiogo.getBuses(1068) - -def test_getSystems(): - passiogo.getSystems() - -def test_printAllSystems(): - passiogo.printAllSystemsMd() \ No newline at end of file + \ No newline at end of file From c197235d68092b90eb190b7b0d9ca8b61c4ab7a7 Mon Sep 17 00:00:00 2001 From: athuler <22741115+athuler@users.noreply.github.com> Date: Wed, 31 Jul 2024 12:23:52 +0200 Subject: [PATCH 06/14] Change Support to Sponsor on PyPi --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 9f096be..20e3bb3 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ setup( project_urls = { 'Documentation': 'https://passiogo.readthedocs.io/', 'GitHub': 'https://github.com/athuler/PassioGo', - 'Support':'https://github.com/sponsors/athuler', + 'Sponsor':'https://github.com/sponsors/athuler', 'Changelog':'https://github.com/athuler/PassioGo/blob/main/CHANGELOG.md', }, ) \ No newline at end of file From e9bf16eed7d942112cf914dd91e008470951154f Mon Sep 17 00:00:00 2001 From: athuler <22741115+athuler@users.noreply.github.com> Date: Wed, 31 Jul 2024 12:24:21 +0200 Subject: [PATCH 07/14] Update __init__.py --- passiogo/__init__.py | 119 +++++++++++++++++++++++-------------------- 1 file changed, 65 insertions(+), 54 deletions(-) diff --git a/passiogo/__init__.py b/passiogo/__init__.py index dbb2abd..1a0703f 100644 --- a/passiogo/__init__.py +++ b/passiogo/__init__.py @@ -18,9 +18,12 @@ def sendApiRequest(url, body): # Send Request response = requests.post(url, json = body) - - # Handle JSON Response - response = response.json() + try: + # Handle JSON Response + response = response.json() + except Exception as e: + raise Exception(f"Error converting API response to JSON! Here is the response received: {response}") + return None # Handle API Error @@ -74,7 +77,7 @@ class TransportationSystem: self.checkTypes() - def checkTypes(self) -> None: + def checkTypes(self): # id : int assert type(self.id) == int, f"'id' parameter must be an int not {type(self.id)}" @@ -121,7 +124,7 @@ class TransportationSystem: self, appVersion = 1, amount = 1 - ): + ) -> list["Route"]: """ Obtains every route for the selected system. ========= @@ -188,12 +191,13 @@ class TransportationSystem: def getStops( self, appVersion = 2, - sA = 1 - ): + sA = 1, + raw = False + ) -> list["Stop"]: """ Obtains all stop for the given system. ========= - appVersion: No discernable change + appVersion: No discernible change sA: 0: error 1: Returns all stops for the given system @@ -213,32 +217,57 @@ class TransportationSystem: if(stops == None): return(None) - # Create Stop Objects + if raw: + return(stops) + + # Create Route & Stops Dictionary + # {routeid -> [stopid, stopid]} + routesAndStops = {} + for routeId, route in stops["routes"].items(): + routesAndStops[routeId] = [] + for stop in route[2:]: + if stop == 0: + continue + routesAndStops[routeId].append(stop[1]) + + + # Create Each Stop Object allStops = [] for id, stop in stops["stops"].items(): + + # Create Route & Positions Dictionary + # {routeid -> [position]} + routesAndPositions = {} + for routeId in routesAndStops.keys(): + if stop["id"] not in routesAndStops[routeId]: + continue + routesAndPositions[routeId] = [i for i,x in enumerate(routesAndStops[routeId]) if x == stop["id"]] + + + keys = ["userId", "radius"] + for key in keys: + if key not in stop: + stop[key] = None + allStops.append(Stop( - id = stop["stopId"], - routeId = stop["routeId"], + id = stop["id"], + routesAndPositions = routesAndPositions, systemId = stop["userId"], - position = stop["position"], name = stop["name"], latitude = stop["latitude"], longitude = stop["longitude"], radius = stop["radius"], - routeName = stop["routeName"], - routeShortname = stop["routeShortname"], - routeGroupId = stop["routeGroupId"], + system = self, )) return(allStops) - def getSystemAlerts( self, appVersion = 1, amount = 1, routesAmount = 0 - ): + ) -> list["SystemAlert"]: """ Gets all system alerts for the selected system. ========= @@ -299,10 +328,11 @@ class TransportationSystem: return(allAlerts) + def getSystems( appVersion = 2, sortMode = 1, -) -> list[TransportationSystem]: +) -> list["TransportationSystem"]: ''' Gets all systems. Returns a list of TransportationSystem. @@ -415,8 +445,6 @@ class Route: serviceTimeShort: str = None, systemId: id = None, system: TransportationSystem = None, - stops: list = None, - ): self.id = id self.groupId = groupId @@ -438,18 +466,21 @@ class Route: self.serviceTimeShort = serviceTimeShort self.systemId = systemId self.system = system - self.stops = stops - - if self.stops is None: - self.stops = [] + def getStops(self): """ Gets the list of stops for this route and stores it as an argument """ - ... - - + + allStops = self.system.getStops() + stopsOnRoute = [] + + for stop in allStops: + if stop.routeId == self.myid: + stopsOnRoute.append(stop) + + return(stopsOnRoute) ### Stops ### @@ -457,48 +488,28 @@ class Stop: def __init__( self, - id: int, - routeId: int = None, + id: str, + routesAndPositions: dict = None, systemId: int = None, - position: int = None, name: str = None, latitude: float = None, longitude: float = None, radius: int = None, - routeName: str = None, - routeShortname: str = None, - routeGroupId : int = None, system : TransportationSystem = None, - route : Route = None, ): + if routesAndPositions is None: + routesAndPositions = {} + self.id = id - self.routeId = routeId + self.routesAndPositions = routesAndPositions self.systemId = systemId - self.position = position self.name = name self.latitude = latitude self.longitude = longitude self.radius = radius - self.routeName = routeName - self.routeShortname = routeShortname - self.routeGroupId = routeGroupId self.system = system - self.route = route - - def getRoute(self): - """ - Get the route object to which this route belongs. - """ - ... - def getSystem(self): - """ - Get the system object to which this route belongs. - """ - ... - - ### System Alerts ### @@ -565,7 +576,7 @@ class SystemAlert: self.fromF = fromF self.fromOk = fromOk self.toOk = toOk - + From ee0f4a88da3b7de54aacca60be3aaa11deeba59a Mon Sep 17 00:00:00 2001 From: athuler <22741115+athuler@users.noreply.github.com> Date: Wed, 31 Jul 2024 13:25:06 +0200 Subject: [PATCH 08/14] Fix Test Failing --- passiogo/__init__.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/passiogo/__init__.py b/passiogo/__init__.py index 1a0703f..9e3f27d 100644 --- a/passiogo/__init__.py +++ b/passiogo/__init__.py @@ -154,8 +154,9 @@ class TransportationSystem: routes = routes["all"] allRoutes = [] - - for route in routes: + #print(routes) + for digit, route in routes.items(): + print(route) possibleKeys = ["id", "groupId", "groupColor", "name", "shortName", "nameOrig", "fullname", "myid", "mapApp", "archive", "goPrefixRouteName", "goShowSchedule", "outdated", "distance", "latitude", "longitude", "timezone", "serviceTime", "serviceTimeShort"] for possibleKey in possibleKeys: @@ -252,7 +253,7 @@ class TransportationSystem: allStops.append(Stop( id = stop["id"], routesAndPositions = routesAndPositions, - systemId = stop["userId"], + systemId = None if stop["userId"] is None else int(stop["userId"]), name = stop["name"], latitude = stop["latitude"], longitude = stop["longitude"], @@ -473,14 +474,8 @@ class Route: Gets the list of stops for this route and stores it as an argument """ - allStops = self.system.getStops() - stopsOnRoute = [] - for stop in allStops: - if stop.routeId == self.myid: - stopsOnRoute.append(stop) - - return(stopsOnRoute) + return(...) ### Stops ### From aaf6d5c439008dc325b364bcf8c9604a6bc54d4c Mon Sep 17 00:00:00 2001 From: athuler <22741115+athuler@users.noreply.github.com> Date: Wed, 31 Jul 2024 14:18:28 +0200 Subject: [PATCH 09/14] Implement Route.getStops() --- passiogo/__init__.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/passiogo/__init__.py b/passiogo/__init__.py index 9e3f27d..bdcb7a0 100644 --- a/passiogo/__init__.py +++ b/passiogo/__init__.py @@ -154,9 +154,7 @@ class TransportationSystem: routes = routes["all"] allRoutes = [] - #print(routes) for digit, route in routes.items(): - print(route) possibleKeys = ["id", "groupId", "groupColor", "name", "shortName", "nameOrig", "fullname", "myid", "mapApp", "archive", "goPrefixRouteName", "goShowSchedule", "outdated", "distance", "latitude", "longitude", "timezone", "serviceTime", "serviceTimeShort"] for possibleKey in possibleKeys: @@ -473,9 +471,17 @@ class Route: """ Gets the list of stops for this route and stores it as an argument """ + stopsForRoute = [] + allStops = self.system.getStops() + for stop in allStops: + if \ + self.myid in list(stop.routesAndPositions.keys()) or \ + self.id in list(stop.routesAndPositions.keys()) or \ + self.groupId in list(stop.routesAndPositions.keys()): + stopsForRoute.append(stop) - return(...) + return(stopsForRoute) ### Stops ### From ca6bcd9ed70feaee13e68e2d8d390f29194b2e54 Mon Sep 17 00:00:00 2001 From: athuler <22741115+athuler@users.noreply.github.com> Date: Wed, 31 Jul 2024 16:35:13 +0200 Subject: [PATCH 10/14] Added Usage Examples #5 --- README.md | 137 +++++++++++++++++++++++++++++++++++++++++++++++++++++ mkdocs.yml | 7 ++- 2 files changed, 142 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0eeddaf..321874b 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,143 @@ pip install passiogo ## Usage +### Transportation System + +Before doing anything, you will need a [`TransportationSystem`](api/#transportationsystem) object. + +If you know the `id` of the desired transportation system, you can obtain the object using `passiogo.getSystemFromID(id)`. + +```python +system = passiogo.getSystemFromID(1068) +``` + +If you do not know the ID of your desired transportation system, you can find it [here](#all-transportation-systems-accessible-by-the-api) or with the following: + +```python +system = passiogo.printAllSystemsMd() +``` + +```md +- 3630 Peachtree (#951)
+- 5025 Apartments (#1634)
+- 725 Ponce (#1832)
+- Agnes Scott College (#1471)
+... +``` + +### Routes + +You can obtain all the routes for a given transportation system using `TransportationSystem.getRoutes()`: + +```python +routes = system.getRoutes() +``` + +Here, `routes` is a list of [`Route`](api/#route) objects. We can look at how much information is available for each route. + +```python +routes[0].__dict__ +``` + +``` +{'id': '133007', + 'groupId': '5702', + 'groupColor': '#0000ff', + 'name': 'Apostolic', + 'shortName': 'AP', + 'nameOrig': 'Apostolic', + 'fullname': 'University of Chicago', + 'myid': '38729', + 'mapApp': '1', + 'archive': '0', + 'goPrefixRouteName': '1', + 'goShowSchedule': 1, + 'outdated': '0', + 'distance': 578, + 'latitude': '41.780867018', + 'longitude': '-87.592902254', + 'serviceTime': None, + 'serviceTimeShort': None, + 'systemId': 1068, + 'system': } +``` + +### Stops + +You can get all the stops within a given transportation system using `TransportationSystem.getStops()`: + +```python +stops = system.getStops() +``` + +Here, `stops` is a list of [`Stop`](api/#stop) objects. We can look at how much information is available for each route. + +```python +stops[0].__dict__ +``` + +``` +{'id': '10103', + 'routesAndPositions': {'4009': [0]}, + 'systemId': 1068, + 'name': 'Medical Stop', + 'latitude': 41.79668374, + 'longitude': -87.595753286, + 'radius': 36, + 'system': } +``` + +If you only wish to get stops for a given route, you can use the `Route.getStops()` method. + +```python +stops = routes[0].getStops() +``` + +### System Alerts + +You can get all system alerts within a given transportation system with the `TransportationSystem.getSystemAlerts()`. + +```python +alerts = system.getSystemAlerts() +``` + +Here, `alerts` is a list of [`SystemAlert`](api/#systemalert). We can look at how much information is available for each alert. + +```python +alerts[0].__dict__ +``` + +``` +{'id': '27535', + 'systemId': '1068', + 'system': , + 'routeId': None, + 'name': 'Nightride Assistance Contact', + 'html': 'During the hours of 4 p.m. until 4 a.m., if you do not see arrival times or buses on route in the app, or experience any unusual event, please contact 773-573-7201 for assistance.', + 'archive': '0', + 'important': '1', + 'dateTimeCreated': '2024-04-09 09:43:10', + 'dateTimeFrom': '2024-04-09 15:40:44', + 'dateTimeTo': '2025-04-16 09:40:44', + 'asPush': '1', + 'gtfs': '1', + 'gtfsAlertCauseId': None, + 'gtfsAlertEffectId': None, + 'gtfsAlertUrl': None, + 'gtfsAlertHeaderText': 'Nightride Assistance Contact', + 'gtfsAlertDescriptionText': 'During the hours of 4 p.m. until 4 a.m., if you do not see arrival times or buses on route in the app, or experience any unusual event, please contact 773-573-7201 for assistance.', + 'routeGroupId': None, + 'createdUtc': '2024-04-09 14:43:10', + 'authorId': '1202', + 'author': 'John Appleseed (abc@domain.com)', + 'updated': '2024-07-17 16:12:02', + 'updateAuthorId': '1217', + 'updateAuthor': 'Mark Appleseed (def@domain.com)', + 'createdF': 'Tuesday, April 9th, 2024 3:40 PM', + 'fromF': 'Tuesday, April 9th, 2024 3:40 PM', + 'fromOk': '1', + 'toOk': '1'} +``` ## Documentation diff --git a/mkdocs.yml b/mkdocs.yml index be35635..c43b541 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -7,7 +7,7 @@ site_author: Andrei Thüler nav: - Home: index.md - - Examples: examples.md +# - Examples: examples.md - API Reference: api.md - Changelog: changelog.md @@ -15,4 +15,7 @@ nav: # - search markdown_extensions: - markdown_include.include: - base_path: . \ No newline at end of file + base_path: . + +watch: + - .\README.md \ No newline at end of file From 09602551c282a81a902e78e4c25d7c13e9f00dc2 Mon Sep 17 00:00:00 2001 From: athuler <22741115+athuler@users.noreply.github.com> Date: Wed, 31 Jul 2024 17:04:27 +0200 Subject: [PATCH 11/14] Move Documentation & Improve contribution - Move documentation higher in README - Improve contributing guidelines --- README.md | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 321874b..8f7aedd 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,18 @@ The package is available to download using [pip](https://pypi.org/project/Passio pip install passiogo ``` +## Documentation + +Project documentation for the latest stable version is available at [passiogo.readthedocs.io](https://passiogo.readthedocs.io/). Documentation for other versions is available at [passiogo.readthedocs.io/en/X.X.X](https://passiogo.readthedocs.io/en/0.1.2/). + +The documentation is built using `mkdocs` and can be rebuilt using the following: + +``` +pip install -r docs/requirements.txt +mkdocs serve +``` + + ## Usage ### Transportation System @@ -158,19 +170,6 @@ alerts[0].__dict__ 'toOk': '1'} ``` - -## Documentation - -Project documentation for the latest stable version is available at [passiogo.readthedocs.io](https://passiogo.readthedocs.io/). Documentation for other versions is available at [passiogo.readthedocs.io/en/X.X.X](https://passiogo.readthedocs.io/en/0.1.2/). - -The documentation is built using `mkdocs` and can be rebuilt using the following: - -``` -pip install -r docs/requirements.txt -mkdocs serve -``` - - ## Changelog This project's changelog is available at [`CHANGELOG.md`](https://github.com/athuler/PassioGo/blob/main/CHANGELOG.md) @@ -183,7 +182,9 @@ Found a bug? Have an idea for a new feature? Please [send it in as a GitHub issu ## Contributing -Interested in contributing to this package? [Fork the repository](https://github.com/athuler/PassioGo/fork), make your edits, then open a pull request! +Interested in contributing to this package? Check out [open issues](https://github.com/athuler/PassioGo/issues). + +When ready, [fork the repository](https://github.com/athuler/PassioGo/fork), make your edits, then open a pull request on the active development branch. ## All Transportation Systems Accessible By The API From 792b0c949b97a74aa33af7fda107c0f6d724b494 Mon Sep 17 00:00:00 2001 From: athuler <22741115+athuler@users.noreply.github.com> Date: Wed, 31 Jul 2024 17:11:22 +0200 Subject: [PATCH 12/14] Add API Documentation Examples --- docs/api.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/docs/api.md b/docs/api.md index 6147a60..70c1875 100644 --- a/docs/api.md +++ b/docs/api.md @@ -66,6 +66,23 @@ passiogo.getSystemFromID(1068) - **goSharedCode** (*int*): Unknown - **goAuthenticationType** (*bool*): Unknown +```json +{'id': 1068, + 'name': 'University of Chicago', + 'username': 'chicago', + 'goAgencyName': 'University of Chicago', + 'email': 'bus@uchicago.edu', + 'goTestMode': False, + 'name2': False, + 'homepage': 'https://safety-security.uchicago.edu/en/transportation', + 'logo': True, + 'goRoutePlannerEnabled': False, + 'goColor': '#843c39', + 'goSupportEmail': 'bus@uchicago.edu', + 'goSharedCode': 1312, + 'goAuthenticationType': False} +``` + ### `TransportationSystem.getRoutes()` Get all routes for the appropriate system. @@ -181,12 +198,50 @@ passiogo.getSystemFromID(1068).getSystemAlerts() - **systemId** (*int*): ID of the transportation system - **system** (*[`TransportationSystem`](#transportationsystem)*): transportation system object +```json +{'id': '133007', + 'groupId': '5702', + 'groupColor': '#0000ff', + 'name': 'Apostolic', + 'shortName': 'AP', + 'nameOrig': 'Apostolic', + 'fullname': 'University of Chicago', + 'myid': '38729', + 'mapApp': '1', + 'archive': '0', + 'goPrefixRouteName': '1', + 'goShowSchedule': 1, + 'outdated': '1', + 'distance': 578, + 'latitude': '41.780867018', + 'longitude': '-87.592902254', + 'serviceTime': 'is not provided: no bus on the route', + 'serviceTimeShort': 'No bus in service', + 'systemId': 1068, + 'system': } +``` + ### `Route.getStops()` Gets the list of stops for this route and stores it as an argument **Output**: *List* of [`Stop`](#stop) +```python +passiogo.getSystemFromID(1068).getRoutes()[0].getStops() +``` + +``` +[, + , + , + , + , + , + , + , + ] +``` ## `Stop` @@ -194,8 +249,8 @@ Gets the list of stops for this route and stores it as an argument **id** is the only required parameter, all other default to *None*. -- **id** (*int*): ID of the stop -- **routeId** (*int*): ID of the route +- **id** (*str*): ID of the stop +- **routeId** (*str*): ID of the route - **systemId** (*int*): ID of the transportation system - **position** (*int*): Unknown - **name** (*str*): Name of the stop @@ -208,6 +263,17 @@ Gets the list of stops for this route and stores it as an argument - **system** (*[`TransportationSystem`](#transportationsystem)*): Transportation system object - **route** (*[`Route`](#route)*): Route object +```json +{'id': '8611', + 'routesAndPositions': {'38728': [0, 7], '38730': [7]}, + 'systemId': 1068, + 'name': 'Drexel Garage', + 'latitude': 41.784433, + 'longitude': -87.604445, + 'radius': 75, + 'system': } +``` + ## `SystemAlert` From cd1f00910a690c50b0de164996962465c200aecf Mon Sep 17 00:00:00 2001 From: athuler <22741115+athuler@users.noreply.github.com> Date: Wed, 31 Jul 2024 17:16:05 +0200 Subject: [PATCH 13/14] Update mkdocs.yml --- mkdocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index c43b541..7b8859e 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -18,4 +18,4 @@ markdown_extensions: base_path: . watch: - - .\README.md \ No newline at end of file + - README.md \ No newline at end of file From 3f953c96ce03ab8fd1e1fae568cbbd1335c524cb Mon Sep 17 00:00:00 2001 From: athuler <22741115+athuler@users.noreply.github.com> Date: Wed, 31 Jul 2024 17:55:10 +0200 Subject: [PATCH 14/14] Update CHANGELOG.md --- CHANGELOG.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 365ca32..3a017ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,23 +1,44 @@ # Changelog + +## 0.2.0 (2024-07-31) + +### Added + +- `TransportationSystem` class with the following methods: `getRoutes()`, `getStops()`, `getSystemAlerts()` +- `Route` class with the following method: `getStops()` +- `Stop` class +- `getSystems()` +- `getSystemsFromID()` +- `printAllSystemsMd()` + +### Changed + +### Removed + + ## 0.1.2 (2024-07-14) ### Added + - Added License ### Changed + - Fixed Documentation Build - All - Fixed PyPi long description type - `printAllSystemsMd()` has the new parameter `includeHtml` with a default of `True` to render HTML breaks after each line ### Removed + - Removed obsolete `debug` parameters ## 0.1.1 (2024-07-12) ### Added + - Create Documentation With ReadTheDocs.io - Create Changelog - New `getSystems()` Method @@ -25,9 +46,11 @@ - Added PyPi Project Links ### Changed + - Change Project Description ### Removed + - None