Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions justoneapi/generated/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from justoneapi.generated.resources.instagram import InstagramResource
from justoneapi.generated.resources.jd import JdResource
from justoneapi.generated.resources.kuaishou import KuaishouResource
from justoneapi.generated.resources.llm import LlmResource
from justoneapi.generated.resources.reddit import RedditResource
from justoneapi.generated.resources.search import SearchResource
from justoneapi.generated.resources.taobao import TaobaoResource
Expand Down Expand Up @@ -43,6 +44,7 @@
"instagram": InstagramResource,
"jd": JdResource,
"kuaishou": KuaishouResource,
"llm": LlmResource,
"reddit": RedditResource,
"search": SearchResource,
"taobao": TaobaoResource,
Expand Down Expand Up @@ -74,6 +76,7 @@
"InstagramResource",
"JdResource",
"KuaishouResource",
"LlmResource",
"RedditResource",
"SearchResource",
"TaobaoResource",
Expand Down
126 changes: 63 additions & 63 deletions justoneapi/generated/resources/douyin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,69 +9,6 @@
class DouyinResource(BaseResource):
"""Generated resource for Douyin (TikTok China)."""

def get_user_detail_v3(
self,
*,
sec_uid: str,
) -> ApiResponse[Any]:
"""
User Profile

Get Douyin (TikTok China) user Profile data, including follower counts, verification status, and bio details, for creator research and account analysis.

Args:
sec_uid: The unique user ID (sec_uid) on Douyin.
"""
return self._get(
"/api/douyin/get-user-detail/v3",
{
"secUid": sec_uid,
},
)

def get_user_video_list_v3(
self,
*,
sec_uid: str,
max_cursor: int | None = 0,
) -> ApiResponse[Any]:
"""
User Published Videos

Get Douyin (TikTok China) user Published Videos data, including captions, covers, and publish times, for account monitoring.

Args:
sec_uid: The unique user ID (sec_uid) on Douyin.
max_cursor: Pagination cursor; use 0 for the first page, and the `max_cursor` from the previous response for subsequent pages.
"""
return self._get(
"/api/douyin/get-user-video-list/v3",
{
"secUid": sec_uid,
"maxCursor": max_cursor,
},
)

def get_video_detail_v2(
self,
*,
video_id: str,
) -> ApiResponse[Any]:
"""
Video Details

Get Douyin (TikTok China) video Details data, including author details, publish time, and engagement counts, for video research, archiving, and performance analysis.

Args:
video_id: The unique video identifier (aweme_id or model_id).
"""
return self._get(
"/api/douyin/get-video-detail/v2",
{
"videoId": video_id,
},
)

def search_video_v4(
self,
*,
Expand Down Expand Up @@ -133,6 +70,49 @@ def search_user_v2(
},
)

def get_user_video_list_v3(
self,
*,
sec_uid: str,
max_cursor: int | None = 0,
) -> ApiResponse[Any]:
"""
User Published Videos

Get Douyin (TikTok China) user Published Videos data, including captions, covers, and publish times, for account monitoring.

Args:
sec_uid: The unique user ID (sec_uid) on Douyin.
max_cursor: Pagination cursor; use 0 for the first page, and the `max_cursor` from the previous response for subsequent pages.
"""
return self._get(
"/api/douyin/get-user-video-list/v3",
{
"secUid": sec_uid,
"maxCursor": max_cursor,
},
)

def get_video_detail_v2(
self,
*,
video_id: str,
) -> ApiResponse[Any]:
"""
Video Details

Get Douyin (TikTok China) video Details data, including author details, publish time, and engagement counts, for video research, archiving, and performance analysis.

Args:
video_id: The unique video identifier (aweme_id or model_id).
"""
return self._get(
"/api/douyin/get-video-detail/v2",
{
"videoId": video_id,
},
)

def get_video_comment_v1(
self,
*,
Expand Down Expand Up @@ -179,6 +159,26 @@ def get_video_sub_comment_v1(
},
)

def get_user_detail_v3(
self,
*,
sec_uid: str,
) -> ApiResponse[Any]:
"""
User Profile

Get Douyin (TikTok China) user Profile data, including follower counts, verification status, and bio details, for creator research and account analysis.

Args:
sec_uid: The unique user ID (sec_uid) on Douyin.
"""
return self._get(
"/api/douyin/get-user-detail/v3",
{
"secUid": sec_uid,
},
)

def share_url_transfer_v1(
self,
*,
Expand Down
76 changes: 38 additions & 38 deletions justoneapi/generated/resources/kuaishou.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,29 @@
class KuaishouResource(BaseResource):
"""Generated resource for Kuaishou."""

def search_video_v2(
self,
*,
keyword: str,
page: int | None = 1,
) -> ApiResponse[Any]:
"""
Video Search

Get Kuaishou video Search data, including video ID, cover image, and description, for competitive analysis and market trends and keywords monitoring and brand tracking.

Args:
keyword: The search keyword to find videos.
page: Page number for results, starting from 1.
"""
return self._get(
"/api/kuaishou/search-video/v2",
{
"keyword": keyword,
"page": page,
},
)

def search_user_v2(
self,
*,
Expand Down Expand Up @@ -75,26 +98,31 @@ def get_video_detail_v2(
},
)

def search_video_v2(
def get_video_comment_v1(
self,
*,
keyword: str,
page: int | None = 1,
video_id: str,
pcursor: str | None = None,
) -> ApiResponse[Any]:
"""
Video Search
Video Comments

Get Kuaishou video Search data, including video ID, cover image, and description, for competitive analysis and market trends and keywords monitoring and brand tracking.
Retrieves public comments of a Kuaishou video, including comment content,
author info, like count, and reply count.

Typical use cases:
- Sentiment analysis and community feedback monitoring
- Gathering engagement data for specific videos

Args:
keyword: The search keyword to find videos.
page: Page number for results, starting from 1.
video_id: The unique ID of the Kuaishou video, e.g. `3xbknvct79h46h9` or refer_photo_id `177012131237`
pcursor: Pagination cursor for subsequent pages.
"""
return self._get(
"/api/kuaishou/search-video/v2",
"/api/kuaishou/get-video-comment/v1",
{
"keyword": keyword,
"page": page,
"videoId": video_id,
"pcursor": pcursor,
},
)

Expand Down Expand Up @@ -137,31 +165,3 @@ def share_url_transfer_v1(
"shareUrl": share_url,
},
)

def get_video_comment_v1(
self,
*,
video_id: str,
pcursor: str | None = None,
) -> ApiResponse[Any]:
"""
Video Comments

Retrieves public comments of a Kuaishou video, including comment content,
author info, like count, and reply count.

Typical use cases:
- Sentiment analysis and community feedback monitoring
- Gathering engagement data for specific videos

Args:
video_id: The unique ID of the Kuaishou video, e.g. `3xbknvct79h46h9` or refer_photo_id `177012131237`
pcursor: Pagination cursor for subsequent pages.
"""
return self._get(
"/api/kuaishou/get-video-comment/v1",
{
"videoId": video_id,
"pcursor": pcursor,
},
)
30 changes: 30 additions & 0 deletions justoneapi/generated/resources/llm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
from __future__ import annotations

from typing import Any

from justoneapi._resource import BaseResource
from justoneapi._response import ApiResponse


class LlmResource(BaseResource):
"""Generated resource for LLM."""

def doubao_answer_v1(
self,
*,
keyword: str,
) -> ApiResponse[Any]:
"""
Doubao Answer

Get a Doubao web answer for a keyword or question, including extracted references when available.

Args:
keyword: Keyword or question to ask Doubao.
"""
return self._get(
"/api/llm/doubao-answer/v1",
{
"keyword": keyword,
},
)
Loading