Skip to content

Change Details Endpoint #5

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

Conversation

brewerdaniel-IW
Copy link
Contributor

@brewerdaniel-IW brewerdaniel-IW commented Nov 5, 2024

Problem

  • While the Draftable API has a /{identifier}/change-details endpoint, it is not available in the SDK

Changes

  • Added a comparisons.change_details method to retrieve the JSON description of changes from the API
  • All classes necessary to interact with these change details in a Pythonic way
  • Changed test files from .txt to .rtf as .txt files do not work on the EU1 endpoint
  • Added new test to validate

Notes

  • Mimicking the existing code patterns/style has been attempted
  • Formatting changes are due to flake8 autoformatting
  • Due to the PR being originated from a fork, I think the secure environment variables that allow the CI to run are not available, hence the failing tests.

@brewerdaniel-IW brewerdaniel-IW marked this pull request as ready for review December 6, 2024 15:37
@brewerdaniel-IW brewerdaniel-IW mentioned this pull request Dec 6, 2024
with open("test-files/change-details.json", "r") as f:
expected_change_details = json.load(f)

assert change_details.to_dict() == expected_change_details
Copy link

Choose a reason for hiding this comment

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

the exact content of changes json is subject to change outside of this library. I am changing the assert to something less strict.

@rychoo2 rychoo2 force-pushed the feat/change-details-endpoint branch from 19a1728 to 0ff4733 Compare January 23, 2025 12:19
@rychoo2 rychoo2 changed the base branch from main to brewerdaniel-IWfeat/change-details-endpoint January 27, 2025 06:50
@rychoo2 rychoo2 merged commit cca6938 into draftable:brewerdaniel-IWfeat/change-details-endpoint Jan 27, 2025
1 check failed
rychoo2 pushed a commit that referenced this pull request Jan 27, 2025
Change details endpoint
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.

2 participants