trendsagi 0.1.0__py3-none-any.whl → 0.1.2__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.
trendsagi/client.py CHANGED
@@ -20,7 +20,7 @@ class TrendsAGIClient:
20
20
  self.base_url = base_url.rstrip('/')
21
21
  self._session = requests.Session()
22
22
  self._session.headers.update({
23
- "Authorization": f"Bearer {api_key}",
23
+ "X-API-Key": api_key,
24
24
  "Content-Type": "application/json",
25
25
  "Accept": "application/json"
26
26
  })
@@ -57,6 +57,9 @@ class TrendsAGIClient:
57
57
 
58
58
  # --- Trends & Insights Methods ---
59
59
 
60
+ # --- START OF FIX ---
61
+ # Added start_date and end_date to the function signature.
62
+ # The `locals()` trick will automatically pick them up and add them to params if they are not None.
60
63
  def get_trends(
61
64
  self,
62
65
  search: Optional[str] = None,
@@ -65,8 +68,11 @@ class TrendsAGIClient:
65
68
  limit: int = 20,
66
69
  offset: int = 0,
67
70
  period: str = '24h',
68
- category: Optional[str] = None
71
+ category: Optional[str] = None,
72
+ start_date: Optional[str] = None,
73
+ end_date: Optional[str] = None
69
74
  ) -> models.TrendListResponse:
75
+ # --- END OF FIX ---
70
76
  """
71
77
  Retrieve a list of currently trending topics.
72
78
  """
@@ -140,7 +146,7 @@ class TrendsAGIClient:
140
146
  source_trend_query: Optional[str] = None, priority: Optional[str] = None, status: str = 'new'
141
147
  ) -> models.RecommendationListResponse:
142
148
  """
143
- Get actionable recommendations generated for the user.
149
+ Get actionable recommendations generated for the.
144
150
  """
145
151
  params = {
146
152
  "limit": limit, "offset": offset, "type": recommendation_type,
trendsagi/models.py CHANGED
@@ -18,6 +18,12 @@ class PaginationMeta(OrmBaseModel):
18
18
  order: Optional[str] = None
19
19
  search: Optional[str] = None
20
20
  category: Optional[str] = None
21
+ # --- START OF FIX ---
22
+ # Add these optional fields to match the updated server response.
23
+ # They will be populated when a custom date range is used.
24
+ start_date: Optional[date] = None
25
+ end_date: Optional[date] = None
26
+ # --- END OF FIX ---
21
27
 
22
28
  # --- Trends & Insights Models ---
23
29
  class TrendItem(OrmBaseModel):
@@ -1,8 +1,29 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: trendsagi
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: The official Python client for the TrendsAGI API.
5
5
  Author-email: TrendsAGI <contact@trendsagi.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) [2025] [TrendsAGI]
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
6
27
  Project-URL: Homepage, https://github.com/TrendsAGI/TrendsAGI
7
28
  Project-URL: Bug Tracker, https://github.com/TrendsAGI/TrendsAGI/issues
8
29
  Classifier: Programming Language :: Python :: 3
@@ -0,0 +1,9 @@
1
+ trendsagi/__init__.py,sha256=f1Pzinj-7c-LlZoxGhKA9RerL0NAZoV1nukGFTjXTo0,320
2
+ trendsagi/client.py,sha256=o7NqCoDsLFF52fUiGi5gBzr2g6T5E3S7zAwcMUcAqbo,16782
3
+ trendsagi/exceptions.py,sha256=t8hUNK8PxHltvgkuvxrnGOhOaNXj5k2Yuvy9GNhd1Io,829
4
+ trendsagi/models.py,sha256=YG7jo0JuX94zDjRFBapUkhOjMD7n_YUHXgral_qq_kM,8003
5
+ trendsagi-0.1.2.dist-info/licenses/LICENSE,sha256=ocFS2cLS1HpUco4lW1upnEEbC37KDrf3x2ugQngE18k,1069
6
+ trendsagi-0.1.2.dist-info/METADATA,sha256=DZ4Gzjj3EB31vDS9pvEIcd-vElPIEPnqVg24bEmn7-0,12064
7
+ trendsagi-0.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
+ trendsagi-0.1.2.dist-info/top_level.txt,sha256=fzNg3zxSm70ICBiM_K5UF1XFq5XN0qUdcYub9U7it0g,10
9
+ trendsagi-0.1.2.dist-info/RECORD,,
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) [2025] [TrendsAGI]
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,9 +0,0 @@
1
- trendsagi/__init__.py,sha256=f1Pzinj-7c-LlZoxGhKA9RerL0NAZoV1nukGFTjXTo0,320
2
- trendsagi/client.py,sha256=PnG6y1ozBY1wR6Bri5dqt38VVGKL57NYk3eHym51Tt4,16502
3
- trendsagi/exceptions.py,sha256=t8hUNK8PxHltvgkuvxrnGOhOaNXj5k2Yuvy9GNhd1Io,829
4
- trendsagi/models.py,sha256=uRCKCl69SpqadTyo2QPGZ_rldkdE7UzDbvBJMpUZejc,7744
5
- trendsagi-0.1.0.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- trendsagi-0.1.0.dist-info/METADATA,sha256=pzLt3bvAtad_yJJwwwHNb5Dt1Xrq1S1wGAxbPaGZ-p8,10825
7
- trendsagi-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
- trendsagi-0.1.0.dist-info/top_level.txt,sha256=fzNg3zxSm70ICBiM_K5UF1XFq5XN0qUdcYub9U7it0g,10
9
- trendsagi-0.1.0.dist-info/RECORD,,
File without changes