Skip to content

A variety of updates to client to update with changes to iracing API - #95

Open
ncrosty58 wants to merge 13 commits into
Esterni:masterfrom
cosmoslab58:master
Open

A variety of updates to client to update with changes to iracing API#95
ncrosty58 wants to merge 13 commits into
Esterni:masterfrom
cosmoslab58:master

Conversation

@ncrosty58

Copy link
Copy Markdown

I've been making some adjustments to the client end points / helper functions to resolve errors that periodically occur due to changes with iracing's interface. This will keep getting updated as new errors pop up

- Merged latest changes from Esterni/pyracing including:
  - Base64 encoded password submission
  - iRacing maintenance mode detection
  - Version bump to 0.1.4

- Cleaned up fork-specific league methods:
  - get_completed_session_info()
  - get_league_calendar_by_season()
  - get_league_active_sessions()
  - get_league_members()
  - league_seasons() with include_inactive param

- Added robustness improvements:
  - Type hints and proper docstrings
  - Null-safety checks on responses
  - Use constants instead of hardcoded URLs
  - Updated httpx follow_redirects parameter

- Updated README with fork documentation
- client_test.py: Replace deprecated asyncio.coroutine and
  asyncio.get_event_loop() with modern asyncio.run()
- pyracing/helpers.py: Replace deprecated datetime.utcfromtimestamp
  with timezone-aware datetime.fromtimestamp(tz=timezone.utc)

These changes ensure compatibility with Python 3.11+ where
asyncio.coroutine was removed and Python 3.12+ where
datetime.utcfromtimestamp is deprecated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant