1Password / connect-sdk-python

Python SDK for 1Password Connect
https://developer.1password.com/docs/connect
MIT License
200 stars 30 forks source link

Use content_path url to fetch the file content #65

Closed volodymyrZotov closed 1 year ago

volodymyrZotov commented 1 year ago

Resolves #46

The Connect server version 1.5.4 and 1.5.5 has an issue with the file id. The id property of the file is different than the file_id used to fetch file content (/v1/vaults/<vault_id>/items/<item_id>/files/<file_id>/content), but it should be the same. Starting from Connect v1.5.6 this issue is resolved and id and file_id has the same value.

This PR provides the fix for the users that use Connect v1.5.4 and v1.5.5. We started to use content_path value which always contains the correct url to fetch the file content.

codecov-commenter commented 1 year ago

Codecov Report

Base: 76.11% // Head: 76.11% // No change to project coverage :thumbsup:

Coverage data is based on head (0b99330) compared to base (ee95ce1). Patch coverage: 25.00% of modified lines in pull request are covered.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #65 +/- ## ======================================= Coverage 76.11% 76.11% ======================================= Files 21 21 Lines 1587 1587 ======================================= Hits 1208 1208 Misses 379 379 ``` | [Impacted Files](https://codecov.io/gh/1Password/connect-sdk-python/pull/65?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [src/onepasswordconnectsdk/client.py](https://codecov.io/gh/1Password/connect-sdk-python/pull/65?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL29uZXBhc3N3b3JkY29ubmVjdHNkay9jbGllbnQucHk=) | `67.28% <25.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.