baronet2 / FirstCyclingAPI

An unofficial Python API wrapper for firstcycling.com
https://firstcyclingapi.readthedocs.io/en/latest/
MIT License
25 stars 3 forks source link

Handle classification standings for 2023 stage races #29

Closed baronet2 closed 1 year ago

baronet2 commented 1 year ago

Overview

As mentioned in #27 , stages races in 2023 have a different API which was causing the non-GC classification results not to get parsed. This PR fixes that and adds these classifications to the standings attribute.

Checklist

Test Instructions

from first_cycling_api import Race
basque = Race(6)
basque.edition(year = 2023).results(classification_num = 2).results_table # Incorrect - GC instead of YC
basque.edition(year = 2023).results(classification_num = 2).standings['youth'] # Correct way to access YC and get warning