Bump cloudinary from 1.32.0 to 1.34.0 (#2109)

* Bump cloudinary from 1.32.0 to 1.34.0

Bumps [cloudinary](https://github.com/cloudinary/pycloudinary) from 1.32.0 to 1.34.0.
- [Release notes](https://github.com/cloudinary/pycloudinary/releases)
- [Changelog](https://github.com/cloudinary/pycloudinary/blob/master/CHANGELOG.md)
- [Commits](https://github.com/cloudinary/pycloudinary/compare/1.32.0...1.34.0)

---
updated-dependencies:
- dependency-name: cloudinary
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update cloudinary==1.34.0

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>

[skip ci]
This commit is contained in:
dependabot[bot] 2023-08-23 21:56:41 -07:00 committed by GitHub
parent edd8c5fdc3
commit 7266a60343
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 167 additions and 29 deletions

View file

@ -155,6 +155,26 @@ def resources_by_context(key, value=None, **options):
return call_api("get", uri, params, **options)
def visual_search(image_url=None, image_asset_id=None, text=None, **options):
"""
Find images based on their visual content.
:param image_url: The URL of an image.
:type image_url: str
:param image_asset_id: The asset_id of an image in your account.
:type image_asset_id: str
:param text: A textual description, e.g., "cat"
:type text: str
:param options: Additional options
:type options: dict, optional
:return: Resources (assets) that were found
:rtype: Response
"""
uri = ["resources", "visual_search"]
params = {"image_url": image_url, "image_asset_id": image_asset_id, "text": text}
return call_api("get", uri, params, **options)
def resource(public_id, **options):
resource_type = options.pop("resource_type", "image")
upload_type = options.pop("type", "upload")
@ -317,6 +337,24 @@ def add_related_assets(public_id, assets_to_relate, resource_type="image", type=
return call_json_api("post", uri, params, **options)
def add_related_assets_by_asset_ids(asset_id, assets_to_relate, **options):
"""
Relates an asset to other assets by asset IDs.
:param asset_id: The asset ID of the asset to update.
:type asset_id: str
:param assets_to_relate: The array of up to 10 asset IDs.
:type assets_to_relate: list[str]
:param options: Additional options.
:type options: dict, optional
:return: The result of the command.
:rtype: dict
"""
uri = ["resources", "related_assets", asset_id]
params = {"assets_to_relate": utils.build_array(assets_to_relate)}
return call_json_api("post", uri, params, **options)
def delete_related_assets(public_id, assets_to_unrelate, resource_type="image", type="upload", **options):
"""
Unrelates an asset from other assets by public IDs.
@ -339,6 +377,24 @@ def delete_related_assets(public_id, assets_to_unrelate, resource_type="image",
return call_json_api("delete", uri, params, **options)
def delete_related_assets_by_asset_ids(asset_id, assets_to_unrelate, **options):
"""
Unrelates an asset from other assets by asset IDs.
:param asset_id: The asset ID of the asset to update.
:type asset_id: str
:param assets_to_unrelate: The array of up to 10 asset IDs.
:type assets_to_unrelate: list[str]
:param options: Additional options.
:type options: dict, optional
:return: The result of the command.
:rtype: dict
"""
uri = ["resources", "related_assets", asset_id]
params = {"assets_to_unrelate": utils.build_array(assets_to_unrelate)}
return call_json_api("delete", uri, params, **options)
def tags(**options):
resource_type = options.pop("resource_type", "image")
uri = ["tags", resource_type]