From ed9c8fa9f1b37460c2e33d01f0cf19a08a651983 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Thu, 13 Feb 2020 11:24:18 -0800 Subject: [PATCH] fix: make 'features' optional to annotate_video again --- .../gapic/video_intelligence_service_client.py | 4 ++-- .../gapic/v1/test_video_intelligence_service_client_v1.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/google/cloud/videointelligence_v1/gapic/video_intelligence_service_client.py b/google/cloud/videointelligence_v1/gapic/video_intelligence_service_client.py index 98707b22..02d5fd9f 100644 --- a/google/cloud/videointelligence_v1/gapic/video_intelligence_service_client.py +++ b/google/cloud/videointelligence_v1/gapic/video_intelligence_service_client.py @@ -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. @@ -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 `__ URIs are supported, which must be specified in the following format: ``gs://bucket-id/object-id`` @@ -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. diff --git a/tests/unit/gapic/v1/test_video_intelligence_service_client_v1.py b/tests/unit/gapic/v1/test_video_intelligence_service_client_v1.py index b4b157f0..87afa899 100644 --- a/tests/unit/gapic/v1/test_video_intelligence_service_client_v1.py +++ b/tests/unit/gapic/v1/test_video_intelligence_service_client_v1.py @@ -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