diff --git a/imagekitio/constants/defaults.py b/imagekitio/constants/defaults.py index 9406acd..ffb51fb 100644 --- a/imagekitio/constants/defaults.py +++ b/imagekitio/constants/defaults.py @@ -9,7 +9,7 @@ class Default(enum.Enum): QUERY_TRANSFORMATION_POSITION, ] DEFAULT_TIMESTAMP = 9999999999 - SDK_VERSION = "python-3.0.0" + SDK_VERSION = "python-3.0.1" TRANSFORMATION_PARAMETER = "tr" CHAIN_TRANSFORM_DELIMITER = ":" TRANSFORM_DELIMITER = "," diff --git a/imagekitio/file.py b/imagekitio/file.py index 8a7741b..2d17921 100644 --- a/imagekitio/file.py +++ b/imagekitio/file.py @@ -130,7 +130,7 @@ def list(self, options: ListAndSearchFileRequestOptions = None) -> ListFileResul url = "{}/v1/files".format(URL.API_BASE_URL) headers = self.request.create_headers() resp = self.request.request( - method="GET", url=url, headers=headers, params=dumps(formatted_options) + method="GET", url=url, headers=headers, params=formatted_options ) if resp.status_code == 200: response = convert_to_list_response_object(resp, FileResult, ListFileResult) diff --git a/setup.py b/setup.py index 7bb8bd8..5146f5b 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setuptools.setup( name="imagekitio", - version="3.0.0", + version="3.0.1", description="Python wrapper for the ImageKit API", long_description=long_description, long_description_content_type="text/markdown", diff --git a/tests/test_files_ops.py b/tests/test_files_ops.py index 223b143..32f1d49 100644 --- a/tests/test_files_ops.py +++ b/tests/test_files_ops.py @@ -500,8 +500,7 @@ def test_list_files_succeeds_with_basic_request_tags_with_array(self) -> None: }]""", headers=headers, match=[ - matchers.query_string_matcher( - "%7B%22type%22:%20%22file%22,%20%22sort%22:%20%22ASC_CREATED%22,%20%22path%22:%20%22/%22,%20%22searchQuery%22:%20%22created_at%20%3E=%20'2d'%20OR%20size%20%3C%20'2mb'%20OR%20format='png'%22,%20%22fileType%22:%20%22all%22,%20%22limit%22:%201,%20%22skip%22:%200,%20%22tags%22:%20%22Tag-1,%20Tag-2,%20Tag-3%22%7D" + matchers.query_string_matcher("type=file&sort=ASC_CREATED&path=%2F&searchQuery=created_at+%3E%3D+%272d%27+OR+size+%3C+%272mb%27+OR+format%3D%27png%27&fileType=all&limit=1&skip=0&tags=Tag-1%2C+Tag-2%2C+Tag-3" ) ], ) @@ -550,7 +549,7 @@ def test_list_files_succeeds_with_basic_request_tags_with_array(self) -> None: ], } self.assertEqual( - "http://test.com/v1/files?%7B%22type%22:%20%22file%22,%20%22sort%22:%20%22ASC_CREATED%22,%20%22path%22:%20%22/%22,%20%22searchQuery%22:%20%22created_at%20%3E=%20'2d'%20OR%20size%20%3C%20'2mb'%20OR%20format='png'%22,%20%22fileType%22:%20%22all%22,%20%22limit%22:%201,%20%22skip%22:%200,%20%22tags%22:%20%22Tag-1,%20Tag-2,%20Tag-3%22%7D", + "http://test.com/v1/files?type=file&sort=ASC_CREATED&path=%2F&searchQuery=created_at+%3E%3D+%272d%27+OR+size+%3C+%272mb%27+OR+format%3D%27png%27&fileType=all&limit=1&skip=0&tags=Tag-1%2C+Tag-2%2C+Tag-3", responses.calls[0].request.url, ) self.assertEqual( @@ -606,8 +605,7 @@ def test_list_files_succeeds_with_basic_request(self) -> None: }]""", headers=headers, match=[ - matchers.query_string_matcher( - "%7B%22type%22:%20%22file%22,%20%22sort%22:%20%22ASC_CREATED%22,%20%22path%22:%20%22/%22,%20%22searchQuery%22:%20%22created_at%20%3E=%20'2d'%20OR%20size%20%3C%20'2mb'%20OR%20format='png'%22,%20%22fileType%22:%20%22all%22,%20%22limit%22:%201,%20%22skip%22:%200,%20%22tags%22:%20%22Tag-1,%20Tag-2,%20Tag-3%22%7D" + matchers.query_string_matcher("type=file&sort=ASC_CREATED&path=%2F&searchQuery=created_at+%3E%3D+%272d%27+OR+size+%3C+%272mb%27+OR+format%3D%27png%27&fileType=all&limit=1&skip=0&tags=Tag-1%2C+Tag-2%2C+Tag-3" ) ], ) @@ -656,7 +654,7 @@ def test_list_files_succeeds_with_basic_request(self) -> None: ], } self.assertEqual( - "http://test.com/v1/files?%7B%22type%22:%20%22file%22,%20%22sort%22:%20%22ASC_CREATED%22,%20%22path%22:%20%22/%22,%20%22searchQuery%22:%20%22created_at%20%3E=%20'2d'%20OR%20size%20%3C%20'2mb'%20OR%20format='png'%22,%20%22fileType%22:%20%22all%22,%20%22limit%22:%201,%20%22skip%22:%200,%20%22tags%22:%20%22Tag-1,%20Tag-2,%20Tag-3%22%7D", + "http://test.com/v1/files?type=file&sort=ASC_CREATED&path=%2F&searchQuery=created_at+%3E%3D+%272d%27+OR+size+%3C+%272mb%27+OR+format%3D%27png%27&fileType=all&limit=1&skip=0&tags=Tag-1%2C+Tag-2%2C+Tag-3", responses.calls[0].request.url, ) self.assertEqual( @@ -680,8 +678,7 @@ def test_list_files_fails_with_400_exception(self) -> None: "documentation for syntax specification.", "help": "For support kindly contact us at support@imagekit.io ."}""", match=[ - matchers.query_string_matcher( - "%7B%22type%22:%20%22file%22,%20%22sort%22:%20%22ASC_CREATED%22,%20%22path%22:%20%22/%22,%20%22searchQuery%22:%20%22created_at%20%3E=%20'2d'%20OR%20size%20%3C%20'2mb'%20OR%20format='png'%22,%20%22fileType%22:%20%22all%22,%20%22limit%22:%201,%20%22skip%22:%200,%20%22tags%22:%20%22Tag-1,%20Tag-2,%20Tag-3%22%7D" + matchers.query_string_matcher("type=file&sort=ASC_CREATED&path=%2F&searchQuery=created_at+%3E%3D+%272d%27+OR+size+%3C+%272mb%27+OR+format%3D%27png%27&fileType=all&limit=1&skip=0&tags=Tag-1%2C+Tag-2%2C+Tag-3" ) ], )