Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
fix: make 'features' optional to annotate_video again
Browse files Browse the repository at this point in the history
  • Loading branch information
busunkim96 committed Feb 13, 2020
1 parent 411bb24 commit ed9c8fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -217,7 +217,7 @@ def annotate_video(
>>> features = [features_element]
>>> input_uri = 'gs://cloud-samples-data/video/cat.mp4'
>>>
>>> response = client.annotate_video(features, input_uri=input_uri)
>>> response = client.annotate_video(input_uri=input_uri, features=features)
>>>
>>> def callback(operation_future):
... # Handle result.
Expand All @@ -229,7 +229,6 @@ def annotate_video(
>>> metadata = response.metadata()
Args:
features (list[~google.cloud.videointelligence_v1.types.Feature]): Required. Requested video annotation features.
input_uri (str): Input video location. Currently, only `Google Cloud
Storage <https://cloud.google.com/storage/>`__ URIs are supported, which
must be specified in the following format: ``gs://bucket-id/object-id``
Expand All @@ -240,6 +239,7 @@ def annotate_video(
videos. Supported wildcards: '\*' to match 0 or more characters; '?' to
match 1 character. If unset, the input video should be embedded in the
request as ``input_content``. If set, ``input_content`` should be unset.
features (list[~google.cloud.videointelligence_v1.types.Feature]): Required. Requested video annotation features.
input_content (bytes): The video data bytes. If unset, the input video(s) should be specified
via ``input_uri``. If set, ``input_uri`` should be unset.
video_context (Union[dict, ~google.cloud.videointelligence_v1.types.VideoContext]): Additional video context and/or feature-specific parameters.
Expand Down
Expand Up @@ -87,7 +87,7 @@ def test_annotate_video(self):
features = [features_element]
input_uri = "gs://cloud-samples-data/video/cat.mp4"

response = client.annotate_video(features, input_uri=input_uri)
response = client.annotate_video(input_uri=input_uri, features=features)
result = response.result()
assert expected_response == result

Expand Down

0 comments on commit ed9c8fa

Please sign in to comment.