-
Notifications
You must be signed in to change notification settings - Fork 87
Feature/improved api client #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Feature/improved api client #29
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in this PR
## Authentication:
- api.py: Uses token-based auth with separate token endpoint
- api_v2.py: Uses direct API key authentication
- api_client.py: Uses Bearer token authentication with better session management
## Error Handling:
- api.py: Basic error handling with ValueError
- api_v2.py: Similar basic error handling
- api_client.py: Advanced error handling with custom exceptions and retries
## Code Organization:
- api.py: Basic class structure
- api_v2.py: Improved structure with better typing
- api_client.py: Full modern Python class with proper documentation, typing, and organization
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we need this, given that we have a pyproject.toml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pyproject.toml
is for abstract dependencies. requirements.txt
and requirements-dev.txt
are for pinned dependencies.
Reference:
Overview
This PR introduces a new
GameAPIClient
class that improves error handling and implements smart retry logic for the GAME SDK. The changes make the SDK more resilient to transient failures while providing clearer error messages to users.Key Changes
GameAPIClient
class with comprehensive error handlingTesting
Impact
These changes will improve the SDK's reliability by: