Skip to content

Commit 93b0ee0

Browse files
justoneapigithub-actions[bot]
authored andcommitted
chore: sync OpenAPI spec and generated SDK
1 parent 443e5a4 commit 93b0ee0

5 files changed

Lines changed: 656 additions & 12 deletions

File tree

justoneapi/generated/resources/xiaohongshu.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,35 @@
99
class XiaohongshuResource(BaseResource):
1010
"""Generated resource for Xiaohongshu (RedNote)."""
1111

12+
def hot_search_v1(
13+
self,
14+
*,
15+
search_word: str | None = "",
16+
page_num: int | None = 1,
17+
order_by: str | None = "premium_imp_num",
18+
nd: str | None = "DAY_7",
19+
) -> ApiResponse[Any]:
20+
"""
21+
Hot Search
22+
23+
Get Xiaohongshu (RedNote) hot Search data, including popular notes and engagement metrics, for content trend discovery.
24+
25+
Args:
26+
search_word: Search keyword.
27+
page_num: Page number for pagination.
28+
order_by: Sort metric for the result set. Available Values: - `premium_imp_num`: Exposure - `premium_good_read_rate`: Read rate - `premium_read_num`: Read count - `premium_engage_num`: Engagement count - `premium_engage_rate`: Engagement rate - `premium_like_num`: Like count - `premium_fav_num`: Favorite count - `premium_cmt_num`: Comment count
29+
nd: Time range in days. Available Values: - `DAY_3`: Last 3 days - `DAY_7`: Last 7 days - `DAY_14`: Last 14 days - `DAY_30`: Last 30 days
30+
"""
31+
return self._get(
32+
"/api/xiaohongshu/hot-search/v1",
33+
{
34+
"searchWord": search_word,
35+
"pageNum": page_num,
36+
"orderBy": order_by,
37+
"nd": nd,
38+
},
39+
)
40+
1241
def get_user_v3(
1342
self,
1443
*,

justoneapi/generated/resources/xiaohongshu_pgy.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,38 @@ def api_pgy_kol_data_core_data_v1(
364364
},
365365
)
366366

367+
def api_pgy_content_square_search_note_v2_v1(
368+
self,
369+
*,
370+
search_word: str | None = "",
371+
page_num: int | None = 1,
372+
biz_type: str | None = "XIAOHONGSHU_HOT",
373+
order_by: str | None = "premium_imp_num",
374+
nd: str | None = "DAY_7",
375+
) -> ApiResponse[Any]:
376+
"""
377+
Content Square Notes
378+
379+
Search Xiaohongshu Creator Marketplace (Pugongying) content square notes by business type, ranking metric, time range, and keyword.
380+
381+
Args:
382+
search_word: Keyword for note search. Empty string searches all notes.
383+
page_num: Page number for results.
384+
biz_type: Business category. Available Values: - `XIAOHONGSHU_HOT`: Xiaohongshu hot - `PRODUCT_SEEDING`: Product seeding - `ECOMMERCE_PROMOTION`: E-commerce promotion - `PUGONGYING_COOPERATION`: Pugongying cooperation - `LEAD_COLLECTION`: Lead collection - `ECOMMERCE_HOT`: E-commerce hot - `SEEDING_DIRECT`: Seeding direct - `APP_PROMOTION`: App promotion
385+
order_by: Ranking metric. Available Values: - `premium_imp_num`: Exposure - `premium_good_read_rate`: Read rate - `premium_read_num`: Read count - `premium_engage_num`: Engagement count - `premium_engage_rate`: Engagement rate - `premium_like_num`: Like count - `premium_fav_num`: Favorite count - `premium_cmt_num`: Comment count
386+
nd: Time range in days. Available Values: - `DAY_3`: Last 3 days - `DAY_7`: Last 7 days - `DAY_14`: Last 14 days - `DAY_30`: Last 30 days
387+
"""
388+
return self._get(
389+
"/api/xiaohongshu-pgy/api/pgy/content_square/search_note_v2/v1",
390+
{
391+
"searchWord": search_word,
392+
"pageNum": page_num,
393+
"bizType": biz_type,
394+
"orderBy": order_by,
395+
"nd": nd,
396+
},
397+
)
398+
367399
def get_kol_info_v1(
368400
self,
369401
*,

justoneapi/generated/resources/zhihu.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ def search_v1(
6666
*,
6767
keyword: str,
6868
offset: int | None = 0,
69+
show_all_topics: str | None = "FALSE",
70+
vertical: str | None = None,
71+
sort: str | None = None,
72+
time_interval: str | None = None,
6973
) -> ApiResponse[Any]:
7074
"""
7175
Keyword Search
@@ -75,12 +79,20 @@ def search_v1(
7579
Args:
7680
keyword: Search keywords.
7781
offset: Start offset, begins with 0.
82+
show_all_topics: Whether to show all topics. Available Values: - `FALSE`: Do not show topics. - `TRUE`: Show all topics.
83+
vertical: Result type filter. Available Values: - `answer`: Answers only. - `article`: Articles only. - `zvideo`: Videos only.
84+
sort: Sorting criteria. Available Values: - `upvoted_count`: Most upvoted. - `created_time`: Latest published.
85+
time_interval: Publish time interval filter. Available Values: - `a_day`: Within one day. - `a_week`: Within one week. - `a_month`: Within one month. - `three_months`: Within three months. - `half_a_year`: Within half a year. - `a_year`: Within one year.
7886
"""
7987
return self._get(
8088
"/api/zhihu/search/v1",
8189
{
8290
"keyword": keyword,
8391
"offset": offset,
92+
"showAllTopics": show_all_topics,
93+
"vertical": vertical,
94+
"sort": sort,
95+
"timeInterval": time_interval,
8496
},
8597
)
8698

0 commit comments

Comments
 (0)