Skip to content
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

Handle realWorldEvidence in login response payload #54

Merged
merged 2 commits into from
Jan 26, 2025

Conversation

robberwick
Copy link
Owner

@robberwick robberwick commented Jan 26, 2025

This pull request introduces several enhancements and new features to the pylibrelinkup library, particularly focusing on the login model and its associated test cases. The most important changes include adding new models, introducing a field validator, and expanding the test coverage.

Enhancements to Models and Validation:

  • src/pylibrelinkup/models/login.py: Added new classes HistoryItem and RealWorldEvidence to handle additional consent data. Updated the Consents class to include a new realWorldEvidence field.
  • src/pylibrelinkup/models/login.py: Introduced a field_validator for the invitations field in the Data class to coerce null values to an empty list.

Error Handling:

Test Coverage:

Fixes #53

@robberwick robberwick requested a review from Copilot January 26, 2025 14:17
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • tests/data/realworldevidence_consent_response.json: Language not supported

src/pylibrelinkup/pylibrelinkup.py Outdated Show resolved Hide resolved
@robberwick robberwick force-pushed the consents-real-world-evidence branch from 8be619f to 8e66995 Compare January 26, 2025 14:32
@robberwick robberwick merged commit 8d5c87e into main Jan 26, 2025
6 checks passed
@robberwick robberwick deleted the consents-real-world-evidence branch January 26, 2025 18:24
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.

Possible Auth Enhancements (diagnostics provided)
1 participant