From a40714f1f82a9f682129ef1fa3c406a1c60b5af3 Mon Sep 17 00:00:00 2001 From: Prratek Ramchandani Date: Wed, 16 Mar 2022 08:38:36 -0400 Subject: [PATCH] convert metrics list to string --- tap_instagram/streams.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tap_instagram/streams.py b/tap_instagram/streams.py index 1aec4a1..80cebb4 100644 --- a/tap_instagram/streams.py +++ b/tap_instagram/streams.py @@ -501,9 +501,10 @@ def get_url_params( self, context: Optional[dict], next_page_token: Optional[Any] ) -> Dict[str, Any]: params = super().get_url_params(context, next_page_token) - params["metric"] = self._metrics_for_media_type( + metrics = self._metrics_for_media_type( context["media_type"], context["media_product_type"] ) + params["metric"] = ",".join(metrics) return params def validate_response(self, response: requests.Response) -> None: @@ -664,9 +665,10 @@ def get_url_params( self, context: Optional[dict], next_page_token: Optional[Any] ) -> Dict[str, Any]: params = super().get_url_params(context, next_page_token) - params["metric"] = self._metrics_for_media_type( + metrics = self._metrics_for_media_type( context["media_type"], context["media_product_type"] ) + params["metric"] = ",".join(metrics) return params def validate_response(self, response: requests.Response) -> None: