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

Add REST API v0.7 support #18

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ngfgrant
Copy link

Description

In the current state this SDK does not allow users to benefit from the changes in the REST API v0.7.

We have recently run into an issue where we added a PDF via a link. The links MIME type was application/octet-stream which was saved as the MIME type in Uploadcare. The ContentInfo object contains the correct/expected MIME type of application/pdf. However, using this SDK we were unable to access these fields since the SDK uses v0.5 by default and v0.6 if configured.

No open issue around this, but I have just encountered an issue with trying to access file.ContentInfo.

  • Adds configuration support for API v0.7
  • Sets the defaultAPIVersion to v0.7 from v0.5.

Enables support for new fields added to the REST API since v0.5.

Checklist

This commit is a step towards resolving the response header warning: 

`Warning: 199 Miscellaneous warning: Please use API version 0.7, not 0.6`

It will also help resolve nil pointer errors when accessing files.ContentInfo, which requires APIv0.7.
Given the warnings being returned by the REST API when using any version < v0.7, we should set the `defaultAPIVersion` to the latest version (v0.7)
onsi/gomega#467 broke the tests here.

See discussion: onsi/gomega#488

Upgrading the go version fixes the issue.
@rsedykh
Copy link
Member

rsedykh commented Mar 31, 2023

Hi. But what about changes that might break lib behaviour?

E.g.:

  • Removed PUT /group/{uuid}/storage/
  • Removed DELETE /files/{uuid}/
  • Remove the option of sorting the file list by file size from GET /files/
  • File information doesn't return image_info and video_info fields anymore in GET /files/{uuid}/
  • Removed rekognition_info in favor of appdata in GET /files/{uuid}/
  • Parameter add_fields was renamed to include in GET /files/{uuid}/

This change might work for you, but might also be a breaking for somebody else. :-(

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