vysion 1.0.15__py3-none-any.whl → 1.0.16__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
vysion/client/client.py CHANGED
@@ -90,12 +90,15 @@ class BaseClient:
90
90
  return api_host
91
91
 
92
92
 
93
- def _build_api_url__(self, endpoint, param, **query_params):
93
+ def _build_api_url__(self, endpoint, param=None, **query_params):
94
94
 
95
- param = quote(param, safe='')
96
95
  _API_HOST = self._get_api_host()
97
96
  _BASE_API = urljoin(_API_HOST, _ENDPOINT_PREFIX)
98
- base = urljoin(_BASE_API, f"{endpoint}/{param}")
97
+ base= urljoin(_BASE_API, endpoint)
98
+
99
+ if param is not None:
100
+ param = quote(param, safe='')
101
+ base = urljoin(_BASE_API, f"{endpoint}/{param}")
99
102
 
100
103
  query_params_initialzed = query_params.copy()
101
104
 
@@ -110,7 +113,6 @@ class BaseClient:
110
113
  del query_params_initialzed[i]
111
114
 
112
115
  query = "?" + urlencode(query_params_initialzed)
113
-
114
116
  return urljoin(base, query)
115
117
 
116
118
  def _make_request(self, url: str) -> dto.VysionResponse:
@@ -192,7 +194,7 @@ class Client(BaseClient):
192
194
 
193
195
  url = self._build_api_url__(
194
196
  "search",
195
- query,
197
+ query=query,
196
198
  tag=tag,
197
199
  notTag=notTag,
198
200
  exact=exact,
@@ -218,7 +220,7 @@ class Client(BaseClient):
218
220
 
219
221
  url = self._build_api_url__(
220
222
  "search-telegram",
221
- query,
223
+ query=query,
222
224
  username=username,
223
225
  page=page,
224
226
  lte=lte,
@@ -410,4 +412,4 @@ class RansomwareFeed(DaylyFeed):
410
412
  yield self._make_request(url)
411
413
 
412
414
 
413
- # TODO /api/v1/feeds
415
+ # TODO /api/v1/feeds
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vysion
3
- Version: 1.0.15
3
+ Version: 1.0.16
4
4
  Summary: The official Python client library for Vysion
5
5
  Home-page: https://vysion.ai
6
6
  License: Apache-2.0
@@ -29,9 +29,9 @@ Welcome to the PyPi webpage for Vysion, our implementation as a Python library t
29
29
 
30
30
  You can request a demo for the web app or an API-key to use in this library at [vysion.ai](https://vysion.ai).
31
31
 
32
- Latest version: [1.0.15](https://pypi.org/project/vysion/)
32
+ Latest version: [1.0.16](https://pypi.org/project/vysion/)
33
33
 
34
- You can visit [the documentation](https://developers.vysion.ai/?python) or our [repository] (https://github.com/ByronLabs/vysion-py/tree/main) for more information on the searches and requests performed with the library or directly on the API.
34
+ You can visit [the documentation](https://developers.vysion.ai/?python) for more information on the searches and requests performed with the library or directly on the API.
35
35
 
36
36
  ### Taxonomy
37
37
 
@@ -1,6 +1,6 @@
1
1
  vysion/__init__.py,sha256=yxJiM-S29q8GB3PBff9tV70P2nvydd8aKLEprLkXw5o,664
2
2
  vysion/client/__init__.py,sha256=aVHmBuetPdybp7TgcNzUx4HkxTjEuXYzSdDYiYfFQd0,630
3
- vysion/client/client.py,sha256=gHORhnVDp-HWRfy0AHQtRrW1IH36tJvXQ7PMZG9lhbg,10814
3
+ vysion/client/client.py,sha256=YYyeGat5YtDWQAWYGgnxreeSZktCg7_b3R8GmerSkDQ,10913
4
4
  vysion/client/error.py,sha256=-i_ixyZ1KlCvuEaooYX8lbK7GIwZ7S1bxlG8DtlgyR4,1176
5
5
  vysion/dto/__init__.py,sha256=ct8JxVMfJ0APiOTgr9ju-JIuBlXOrPkx7n2qISSXUts,605
6
6
  vysion/dto/dto.py,sha256=1RrmeieN4yx150MByMr-uIl2TsJtAvLjcXcB4cK4Dl0,10934
@@ -17,7 +17,7 @@ vysion/taxonomy/__init__.py,sha256=Bc364AYxRCyjIn26-XBPeEDCPe3Hma4r5RAI8R8eblU,6
17
17
  vysion/taxonomy/flavours.py,sha256=ubImHBE8v0zhzFy_2YozAQk2SzN1XDQwHAxb2RebtCo,2347
18
18
  vysion/taxonomy/taxonomy.py,sha256=8gg-jPwPc0yis5wpABTFkmKq8bFYJG2vHjHXR3ol2cY,12264
19
19
  vysion/version.py,sha256=vCKpGKIppwQBOyOQdqwyPjvmB6R68KLsfaZErJCVido,610
20
- vysion-1.0.15.dist-info/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
21
- vysion-1.0.15.dist-info/METADATA,sha256=p5W6HyOU-bIR3k4fwcaF8aU_rs26ICtec1YVX7yA4ZE,2195
22
- vysion-1.0.15.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
23
- vysion-1.0.15.dist-info/RECORD,,
20
+ vysion-1.0.16.dist-info/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
21
+ vysion-1.0.16.dist-info/METADATA,sha256=YEUcnB6C-5U4947YX5q7tVH9R-j1JhroCF1b_k5uJ4Q,2124
22
+ vysion-1.0.16.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
23
+ vysion-1.0.16.dist-info/RECORD,,