justoneapi 1.3.0__tar.gz → 1.4.0__tar.gz

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.
Files changed (31) hide show
  1. {justoneapi-1.3.0 → justoneapi-1.4.0}/PKG-INFO +1 -1
  2. justoneapi-1.4.0/justoneapi/__init__.py +2 -0
  3. {justoneapi-1.3.0 → justoneapi-1.4.0}/justoneapi/apis/xiaohongshu.py +19 -1
  4. {justoneapi-1.3.0 → justoneapi-1.4.0}/justoneapi.egg-info/PKG-INFO +1 -1
  5. {justoneapi-1.3.0 → justoneapi-1.4.0}/pyproject.toml +1 -1
  6. justoneapi-1.3.0/justoneapi/__init__.py +0 -2
  7. {justoneapi-1.3.0 → justoneapi-1.4.0}/LICENSE +0 -0
  8. {justoneapi-1.3.0 → justoneapi-1.4.0}/README.md +0 -0
  9. {justoneapi-1.3.0 → justoneapi-1.4.0}/justoneapi/apis/__init__.py +0 -0
  10. {justoneapi-1.3.0 → justoneapi-1.4.0}/justoneapi/apis/bilibili.py +0 -0
  11. {justoneapi-1.3.0 → justoneapi-1.4.0}/justoneapi/apis/douyin.py +0 -0
  12. {justoneapi-1.3.0 → justoneapi-1.4.0}/justoneapi/apis/kuaishou.py +0 -0
  13. {justoneapi-1.3.0 → justoneapi-1.4.0}/justoneapi/apis/request_util.py +0 -0
  14. {justoneapi-1.3.0 → justoneapi-1.4.0}/justoneapi/apis/taobao.py +0 -0
  15. {justoneapi-1.3.0 → justoneapi-1.4.0}/justoneapi/apis/user.py +0 -0
  16. {justoneapi-1.3.0 → justoneapi-1.4.0}/justoneapi/apis/weibo.py +0 -0
  17. {justoneapi-1.3.0 → justoneapi-1.4.0}/justoneapi/client.py +0 -0
  18. {justoneapi-1.3.0 → justoneapi-1.4.0}/justoneapi/config.py +0 -0
  19. {justoneapi-1.3.0 → justoneapi-1.4.0}/justoneapi/log.py +0 -0
  20. {justoneapi-1.3.0 → justoneapi-1.4.0}/justoneapi.egg-info/SOURCES.txt +0 -0
  21. {justoneapi-1.3.0 → justoneapi-1.4.0}/justoneapi.egg-info/dependency_links.txt +0 -0
  22. {justoneapi-1.3.0 → justoneapi-1.4.0}/justoneapi.egg-info/requires.txt +0 -0
  23. {justoneapi-1.3.0 → justoneapi-1.4.0}/justoneapi.egg-info/top_level.txt +0 -0
  24. {justoneapi-1.3.0 → justoneapi-1.4.0}/setup.cfg +0 -0
  25. {justoneapi-1.3.0 → justoneapi-1.4.0}/tests/test_bilibili.py +0 -0
  26. {justoneapi-1.3.0 → justoneapi-1.4.0}/tests/test_douyin.py +0 -0
  27. {justoneapi-1.3.0 → justoneapi-1.4.0}/tests/test_kuaishou.py +0 -0
  28. {justoneapi-1.3.0 → justoneapi-1.4.0}/tests/test_taobao.py +0 -0
  29. {justoneapi-1.3.0 → justoneapi-1.4.0}/tests/test_user.py +0 -0
  30. {justoneapi-1.3.0 → justoneapi-1.4.0}/tests/test_weibo.py +0 -0
  31. {justoneapi-1.3.0 → justoneapi-1.4.0}/tests/test_xiaohongshu.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: justoneapi
3
- Version: 1.3.0
3
+ Version: 1.4.0
4
4
  Summary: Official Python SDK for Just One API
5
5
  Author-email: Just One API <justoneapi@gmail.com>
6
6
  Description-Content-Type: text/markdown
@@ -0,0 +1,2 @@
1
+ __version__ = "1.4.0"
2
+
@@ -35,6 +35,22 @@ class XiaohongshuAPI:
35
35
  logger.warning(f"Pagination parse error at {url}. Contact us to fix it.")
36
36
  return result, data, message, has_next_page
37
37
 
38
+ def get_note_detail_v1(self, note_id: str):
39
+ url = f"{self.base_url}/api/xiaohongshu/get-note-detail/v1"
40
+ params = {
41
+ "token": self.token,
42
+ "noteId": note_id,
43
+ }
44
+ return request_util.get_request(url, params)
45
+
46
+ def get_note_detail_v4(self, note_id: str):
47
+ url = f"{self.base_url}/api/xiaohongshu/get-note-detail/v4"
48
+ params = {
49
+ "token": self.token,
50
+ "noteId": note_id,
51
+ }
52
+ return request_util.get_request(url, params)
53
+
38
54
  def get_note_detail_v7(self, note_id: str):
39
55
  url = f"{self.base_url}/api/xiaohongshu/get-note-detail/v7"
40
56
  params = {
@@ -51,7 +67,7 @@ class XiaohongshuAPI:
51
67
  }
52
68
  return request_util.get_request(url, params)
53
69
 
54
- def get_note_comment_v2(self, note_id: str, last_cursor: str = None):
70
+ def get_note_comment_v2(self, note_id: str, last_cursor: str = None, sort: str = "latest"):
55
71
  url = f"{self.base_url}/api/xiaohongshu/get-note-comment/v2"
56
72
  params = {
57
73
  "token": self.token,
@@ -59,6 +75,8 @@ class XiaohongshuAPI:
59
75
  }
60
76
  if last_cursor:
61
77
  params["lastCursor"] = last_cursor
78
+ if sort:
79
+ params["sort"] = sort
62
80
 
63
81
  has_next_page = False
64
82
  result, data, message = request_util.get_request_page(url, params)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: justoneapi
3
- Version: 1.3.0
3
+ Version: 1.4.0
4
4
  Summary: Official Python SDK for Just One API
5
5
  Author-email: Just One API <justoneapi@gmail.com>
6
6
  Description-Content-Type: text/markdown
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "justoneapi"
3
- version = "1.3.0"
3
+ version = "1.4.0"
4
4
  description = "Official Python SDK for Just One API"
5
5
  authors = [{ name="Just One API", email="justoneapi@gmail.com" }]
6
6
  readme = "README.md"
@@ -1,2 +0,0 @@
1
- __version__ = "1.3.0"
2
-
File without changes
File without changes
File without changes
File without changes