Skip to content

Latest commit

 

History

History
1692 lines (1270 loc) · 74.3 KB

File metadata and controls

1692 lines (1270 loc) · 74.3 KB

tikhub_sdk_v2.YouTubeWebAPIApi

All URIs are relative to http://localhost

Method HTTP request Description
get_channel_id_api_v1_youtube_web_get_channel_id_get GET /api/v1/youtube/web/get_channel_id 获取频道ID/Get channel ID
get_channel_id_api_v1_youtube_web_get_channel_id_get_0 GET /api/v1/youtube/web/get_channel_id 获取频道ID/Get channel ID
get_channel_info_api_v1_youtube_web_get_channel_info_get GET /api/v1/youtube/web/get_channel_info 获取频道信息/Get channel information
get_channel_info_api_v1_youtube_web_get_channel_info_get_0 GET /api/v1/youtube/web/get_channel_info 获取频道信息/Get channel information
get_channel_short_videos_api_v1_youtube_web_get_channel_short_videos_get GET /api/v1/youtube/web/get_channel_short_videos 获取频道短视频/Get channel short videos
get_channel_short_videos_api_v1_youtube_web_get_channel_short_videos_get_0 GET /api/v1/youtube/web/get_channel_short_videos 获取频道短视频/Get channel short videos
get_channel_videos_api_v1_youtube_web_get_channel_videos_get GET /api/v1/youtube/web/get_channel_videos 获取频道视频/Get channel videos
get_channel_videos_api_v1_youtube_web_get_channel_videos_get_0 GET /api/v1/youtube/web/get_channel_videos 获取频道视频/Get channel videos
get_relate_video_api_v1_youtube_web_get_relate_video_get GET /api/v1/youtube/web/get_relate_video 获取推荐视频/Get related videos
get_relate_video_api_v1_youtube_web_get_relate_video_get_0 GET /api/v1/youtube/web/get_relate_video 获取推荐视频/Get related videos
get_trending_videos_api_v1_youtube_web_get_trending_videos_get GET /api/v1/youtube/web/get_trending_videos 获取趋势视频/Get trending videos
get_trending_videos_api_v1_youtube_web_get_trending_videos_get_0 GET /api/v1/youtube/web/get_trending_videos 获取趋势视频/Get trending videos
get_video_comments_api_v1_youtube_web_get_video_comments_get GET /api/v1/youtube/web/get_video_comments 获取视频评论/Get video comments
get_video_comments_api_v1_youtube_web_get_video_comments_get_0 GET /api/v1/youtube/web/get_video_comments 获取视频评论/Get video comments
get_video_info_api_v1_youtube_web_get_video_info_get GET /api/v1/youtube/web/get_video_info 获取视频信息/Get video information
get_video_info_api_v1_youtube_web_get_video_info_get_0 GET /api/v1/youtube/web/get_video_info 获取视频信息/Get video information
get_video_subtitles_api_v1_youtube_web_get_video_subtitles_get GET /api/v1/youtube/web/get_video_subtitles 获取视频字幕/Get video subtitles
get_video_subtitles_api_v1_youtube_web_get_video_subtitles_get_0 GET /api/v1/youtube/web/get_video_subtitles 获取视频字幕/Get video subtitles
search_channel_api_v1_youtube_web_search_channel_get GET /api/v1/youtube/web/search_channel 搜索频道/Search channel
search_channel_api_v1_youtube_web_search_channel_get_0 GET /api/v1/youtube/web/search_channel 搜索频道/Search channel
search_video_api_v1_youtube_web_search_video_get GET /api/v1/youtube/web/search_video 搜索视频/Search video
search_video_api_v1_youtube_web_search_video_get_0 GET /api/v1/youtube/web/search_video 搜索视频/Search video

get_channel_id_api_v1_youtube_web_get_channel_id_get

ResponseModel get_channel_id_api_v1_youtube_web_get_channel_id_get(channel_name)

获取频道ID/Get channel ID

[中文] ### 用途: - 获取频道ID。 ### 参数: - channel_name: 频道名称。 ### 返回: - 频道ID。 # [English] ### Purpose: - Get channel ID. ### Parameters: - channel_name: Channel name. ### Returns: - Channel ID. # [示例/Example] channel_name = "LinusTechTips"

Example

  • Bearer Authentication (bearer):
from __future__ import print_function
import time
import tikhub_sdk_v2
from tikhub_sdk_v2.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = tikhub_sdk_v2.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearer
configuration = tikhub_sdk_v2.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with tikhub_sdk_v2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tikhub_sdk_v2.YouTubeWebAPIApi(api_client)
    channel_name = 'LinusTechTips' # str | 频道名称/Channel name

    try:
        # 获取频道ID/Get channel ID
        api_response = api_instance.get_channel_id_api_v1_youtube_web_get_channel_id_get(channel_name)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling YouTubeWebAPIApi->get_channel_id_api_v1_youtube_web_get_channel_id_get: %s\n" % e)

Parameters

Name Type Description Notes
channel_name str 频道名称/Channel name

Return type

ResponseModel

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_channel_id_api_v1_youtube_web_get_channel_id_get_0

ResponseModel get_channel_id_api_v1_youtube_web_get_channel_id_get_0(channel_name)

获取频道ID/Get channel ID

[中文] ### 用途: - 获取频道ID。 ### 参数: - channel_name: 频道名称。 ### 返回: - 频道ID。 # [English] ### Purpose: - Get channel ID. ### Parameters: - channel_name: Channel name. ### Returns: - Channel ID. # [示例/Example] channel_name = "LinusTechTips"

Example

  • Bearer Authentication (bearer):
from __future__ import print_function
import time
import tikhub_sdk_v2
from tikhub_sdk_v2.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = tikhub_sdk_v2.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearer
configuration = tikhub_sdk_v2.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with tikhub_sdk_v2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tikhub_sdk_v2.YouTubeWebAPIApi(api_client)
    channel_name = 'LinusTechTips' # str | 频道名称/Channel name

    try:
        # 获取频道ID/Get channel ID
        api_response = api_instance.get_channel_id_api_v1_youtube_web_get_channel_id_get_0(channel_name)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling YouTubeWebAPIApi->get_channel_id_api_v1_youtube_web_get_channel_id_get_0: %s\n" % e)

Parameters

Name Type Description Notes
channel_name str 频道名称/Channel name

Return type

ResponseModel

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_channel_info_api_v1_youtube_web_get_channel_info_get

ResponseModel get_channel_info_api_v1_youtube_web_get_channel_info_get(channel_id)

获取频道信息/Get channel information

[中文] ### 用途: - 获取频道信息。 ### 参数: - channel_id: 频道ID。 ### 返回: - 频道信息。 # [English] ### Purpose: - Get channel information. ### Parameters: - channel_id: Channel ID. ### Returns: - Channel information. # [示例/Example] channel_id = "UCXuqSBlHAE6Xw-yeJA0Tunw"

Example

  • Bearer Authentication (bearer):
from __future__ import print_function
import time
import tikhub_sdk_v2
from tikhub_sdk_v2.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = tikhub_sdk_v2.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearer
configuration = tikhub_sdk_v2.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with tikhub_sdk_v2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tikhub_sdk_v2.YouTubeWebAPIApi(api_client)
    channel_id = 'UCXuqSBlHAE6Xw-yeJA0Tunw' # str | 频道ID/Channel ID

    try:
        # 获取频道信息/Get channel information
        api_response = api_instance.get_channel_info_api_v1_youtube_web_get_channel_info_get(channel_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling YouTubeWebAPIApi->get_channel_info_api_v1_youtube_web_get_channel_info_get: %s\n" % e)

Parameters

Name Type Description Notes
channel_id str 频道ID/Channel ID

Return type

ResponseModel

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_channel_info_api_v1_youtube_web_get_channel_info_get_0

ResponseModel get_channel_info_api_v1_youtube_web_get_channel_info_get_0(channel_id)

获取频道信息/Get channel information

[中文] ### 用途: - 获取频道信息。 ### 参数: - channel_id: 频道ID。 ### 返回: - 频道信息。 # [English] ### Purpose: - Get channel information. ### Parameters: - channel_id: Channel ID. ### Returns: - Channel information. # [示例/Example] channel_id = "UCXuqSBlHAE6Xw-yeJA0Tunw"

Example

  • Bearer Authentication (bearer):
from __future__ import print_function
import time
import tikhub_sdk_v2
from tikhub_sdk_v2.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = tikhub_sdk_v2.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearer
configuration = tikhub_sdk_v2.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with tikhub_sdk_v2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tikhub_sdk_v2.YouTubeWebAPIApi(api_client)
    channel_id = 'UCXuqSBlHAE6Xw-yeJA0Tunw' # str | 频道ID/Channel ID

    try:
        # 获取频道信息/Get channel information
        api_response = api_instance.get_channel_info_api_v1_youtube_web_get_channel_info_get_0(channel_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling YouTubeWebAPIApi->get_channel_info_api_v1_youtube_web_get_channel_info_get_0: %s\n" % e)

Parameters

Name Type Description Notes
channel_id str 频道ID/Channel ID

Return type

ResponseModel

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_channel_short_videos_api_v1_youtube_web_get_channel_short_videos_get

ResponseModel get_channel_short_videos_api_v1_youtube_web_get_channel_short_videos_get(channel_id, continuation_token=continuation_token)

获取频道短视频/Get channel short videos

[中文] ### 用途: - 获取频道短视频。 ### 参数: - channel_id: 频道ID。 - continuation_token: 用于继续获取频道短视频的令牌。默认为None。 ### 返回: - 频道短视频。 # [English] ### Purpose: - Get channel short videos. ### Parameters: - channel_id: Channel ID. - continuation_token: Token to continue fetching channel short videos. Default is None. ### Returns: - Channel short videos. # [示例/Example] channel_id = "UCXuqSBlHAE6Xw-yeJA0Tunw"

Example

  • Bearer Authentication (bearer):
from __future__ import print_function
import time
import tikhub_sdk_v2
from tikhub_sdk_v2.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = tikhub_sdk_v2.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearer
configuration = tikhub_sdk_v2.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with tikhub_sdk_v2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tikhub_sdk_v2.YouTubeWebAPIApi(api_client)
    channel_id = 'UCXuqSBlHAE6Xw-yeJA0Tunw' # str | 频道ID/Channel ID
continuation_token = 'continuation_token_example' # str | 翻页令牌/Pagination token (optional)

    try:
        # 获取频道短视频/Get channel short videos
        api_response = api_instance.get_channel_short_videos_api_v1_youtube_web_get_channel_short_videos_get(channel_id, continuation_token=continuation_token)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling YouTubeWebAPIApi->get_channel_short_videos_api_v1_youtube_web_get_channel_short_videos_get: %s\n" % e)

Parameters

Name Type Description Notes
channel_id str 频道ID/Channel ID
continuation_token str 翻页令牌/Pagination token [optional]

Return type

ResponseModel

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_channel_short_videos_api_v1_youtube_web_get_channel_short_videos_get_0

ResponseModel get_channel_short_videos_api_v1_youtube_web_get_channel_short_videos_get_0(channel_id, continuation_token=continuation_token)

获取频道短视频/Get channel short videos

[中文] ### 用途: - 获取频道短视频。 ### 参数: - channel_id: 频道ID。 - continuation_token: 用于继续获取频道短视频的令牌。默认为None。 ### 返回: - 频道短视频。 # [English] ### Purpose: - Get channel short videos. ### Parameters: - channel_id: Channel ID. - continuation_token: Token to continue fetching channel short videos. Default is None. ### Returns: - Channel short videos. # [示例/Example] channel_id = "UCXuqSBlHAE6Xw-yeJA0Tunw"

Example

  • Bearer Authentication (bearer):
from __future__ import print_function
import time
import tikhub_sdk_v2
from tikhub_sdk_v2.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = tikhub_sdk_v2.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearer
configuration = tikhub_sdk_v2.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with tikhub_sdk_v2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tikhub_sdk_v2.YouTubeWebAPIApi(api_client)
    channel_id = 'UCXuqSBlHAE6Xw-yeJA0Tunw' # str | 频道ID/Channel ID
continuation_token = 'continuation_token_example' # str | 翻页令牌/Pagination token (optional)

    try:
        # 获取频道短视频/Get channel short videos
        api_response = api_instance.get_channel_short_videos_api_v1_youtube_web_get_channel_short_videos_get_0(channel_id, continuation_token=continuation_token)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling YouTubeWebAPIApi->get_channel_short_videos_api_v1_youtube_web_get_channel_short_videos_get_0: %s\n" % e)

Parameters

Name Type Description Notes
channel_id str 频道ID/Channel ID
continuation_token str 翻页令牌/Pagination token [optional]

Return type

ResponseModel

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_channel_videos_api_v1_youtube_web_get_channel_videos_get

ResponseModel get_channel_videos_api_v1_youtube_web_get_channel_videos_get(channel_id, continuation_token=continuation_token)

获取频道视频/Get channel videos

[中文] ### 用途: - 获取频道视频。 ### 参数: - channel_id: 频道ID。 - continuation_token: 用于继续获取频道视频的令牌。默认为None。 ### 返回: - 频道视频。 # [English] ### Purpose: - Get channel videos. ### Parameters: - channel_id: Channel ID. - continuation_token: Token to continue fetching channel videos. Default is None. ### Returns: - Channel videos. # [示例/Example] channel_id = "UCXuqSBlHAE6Xw-yeJA0Tunw"

Example

  • Bearer Authentication (bearer):
from __future__ import print_function
import time
import tikhub_sdk_v2
from tikhub_sdk_v2.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = tikhub_sdk_v2.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearer
configuration = tikhub_sdk_v2.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with tikhub_sdk_v2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tikhub_sdk_v2.YouTubeWebAPIApi(api_client)
    channel_id = 'UCXuqSBlHAE6Xw-yeJA0Tunw' # str | 频道ID/Channel ID
continuation_token = 'continuation_token_example' # str | 翻页令牌/Pagination token (optional)

    try:
        # 获取频道视频/Get channel videos
        api_response = api_instance.get_channel_videos_api_v1_youtube_web_get_channel_videos_get(channel_id, continuation_token=continuation_token)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling YouTubeWebAPIApi->get_channel_videos_api_v1_youtube_web_get_channel_videos_get: %s\n" % e)

Parameters

Name Type Description Notes
channel_id str 频道ID/Channel ID
continuation_token str 翻页令牌/Pagination token [optional]

Return type

ResponseModel

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_channel_videos_api_v1_youtube_web_get_channel_videos_get_0

ResponseModel get_channel_videos_api_v1_youtube_web_get_channel_videos_get_0(channel_id, continuation_token=continuation_token)

获取频道视频/Get channel videos

[中文] ### 用途: - 获取频道视频。 ### 参数: - channel_id: 频道ID。 - continuation_token: 用于继续获取频道视频的令牌。默认为None。 ### 返回: - 频道视频。 # [English] ### Purpose: - Get channel videos. ### Parameters: - channel_id: Channel ID. - continuation_token: Token to continue fetching channel videos. Default is None. ### Returns: - Channel videos. # [示例/Example] channel_id = "UCXuqSBlHAE6Xw-yeJA0Tunw"

Example

  • Bearer Authentication (bearer):
from __future__ import print_function
import time
import tikhub_sdk_v2
from tikhub_sdk_v2.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = tikhub_sdk_v2.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearer
configuration = tikhub_sdk_v2.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with tikhub_sdk_v2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tikhub_sdk_v2.YouTubeWebAPIApi(api_client)
    channel_id = 'UCXuqSBlHAE6Xw-yeJA0Tunw' # str | 频道ID/Channel ID
continuation_token = 'continuation_token_example' # str | 翻页令牌/Pagination token (optional)

    try:
        # 获取频道视频/Get channel videos
        api_response = api_instance.get_channel_videos_api_v1_youtube_web_get_channel_videos_get_0(channel_id, continuation_token=continuation_token)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling YouTubeWebAPIApi->get_channel_videos_api_v1_youtube_web_get_channel_videos_get_0: %s\n" % e)

Parameters

Name Type Description Notes
channel_id str 频道ID/Channel ID
continuation_token str 翻页令牌/Pagination token [optional]

Return type

ResponseModel

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_relate_video_api_v1_youtube_web_get_relate_video_get

ResponseModel get_relate_video_api_v1_youtube_web_get_relate_video_get(video_id, continuation_token=continuation_token)

获取推荐视频/Get related videos

[中文] ### 用途: - 根据视频ID获取推荐视频数据。 ### 参数: - video_id: 视频ID,从URL中获取,例如:https://www.youtube.com/watch?v=LuIL5JATZsc,这里的video_id就是LuIL5JATZsc。 - continuation_token: 用于继续获取推荐视频的令牌。默认为None。 ### 返回: - 推荐视频数据。 # [English] ### Purpose: - Get related videos by video ID. ### Parameters: - video_id: Video ID, get it from the URL, for example: https://www.youtube.com/watch?v=LuIL5JATZsc, the id is LuIL5JATZsc. - continuation_token: Token to continue fetching related videos. Default is None. ### Returns: - Related videos. # [示例/Example] video_id = "LuIL5JATZsc"

Example

  • Bearer Authentication (bearer):
from __future__ import print_function
import time
import tikhub_sdk_v2
from tikhub_sdk_v2.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = tikhub_sdk_v2.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearer
configuration = tikhub_sdk_v2.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with tikhub_sdk_v2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tikhub_sdk_v2.YouTubeWebAPIApi(api_client)
    video_id = 'LuIL5JATZsc' # str | 视频ID/Video ID
continuation_token = 'continuation_token_example' # str | 翻页令牌/Pagination token (optional)

    try:
        # 获取推荐视频/Get related videos
        api_response = api_instance.get_relate_video_api_v1_youtube_web_get_relate_video_get(video_id, continuation_token=continuation_token)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling YouTubeWebAPIApi->get_relate_video_api_v1_youtube_web_get_relate_video_get: %s\n" % e)

Parameters

Name Type Description Notes
video_id str 视频ID/Video ID
continuation_token str 翻页令牌/Pagination token [optional]

Return type

ResponseModel

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_relate_video_api_v1_youtube_web_get_relate_video_get_0

ResponseModel get_relate_video_api_v1_youtube_web_get_relate_video_get_0(video_id, continuation_token=continuation_token)

获取推荐视频/Get related videos

[中文] ### 用途: - 根据视频ID获取推荐视频数据。 ### 参数: - video_id: 视频ID,从URL中获取,例如:https://www.youtube.com/watch?v=LuIL5JATZsc,这里的video_id就是LuIL5JATZsc。 - continuation_token: 用于继续获取推荐视频的令牌。默认为None。 ### 返回: - 推荐视频数据。 # [English] ### Purpose: - Get related videos by video ID. ### Parameters: - video_id: Video ID, get it from the URL, for example: https://www.youtube.com/watch?v=LuIL5JATZsc, the id is LuIL5JATZsc. - continuation_token: Token to continue fetching related videos. Default is None. ### Returns: - Related videos. # [示例/Example] video_id = "LuIL5JATZsc"

Example

  • Bearer Authentication (bearer):
from __future__ import print_function
import time
import tikhub_sdk_v2
from tikhub_sdk_v2.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = tikhub_sdk_v2.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearer
configuration = tikhub_sdk_v2.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with tikhub_sdk_v2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tikhub_sdk_v2.YouTubeWebAPIApi(api_client)
    video_id = 'LuIL5JATZsc' # str | 视频ID/Video ID
continuation_token = 'continuation_token_example' # str | 翻页令牌/Pagination token (optional)

    try:
        # 获取推荐视频/Get related videos
        api_response = api_instance.get_relate_video_api_v1_youtube_web_get_relate_video_get_0(video_id, continuation_token=continuation_token)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling YouTubeWebAPIApi->get_relate_video_api_v1_youtube_web_get_relate_video_get_0: %s\n" % e)

Parameters

Name Type Description Notes
video_id str 视频ID/Video ID
continuation_token str 翻页令牌/Pagination token [optional]

Return type

ResponseModel

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_trending_videos_api_v1_youtube_web_get_trending_videos_get

ResponseModel get_trending_videos_api_v1_youtube_web_get_trending_videos_get(language_code=language_code, country_code=country_code, section=section)

获取趋势视频/Get trending videos

[中文] ### 用途: - 获取趋势视频。 ### 参数: - language_code: 语言代码,默认为en。 - country_code: 国家代码,默认为us。 - section: 类型,默认为Now,可选值为Music, Gaming, Movies。 ### 返回: - 趋势视频。 # [English] ### Purpose: - Get trending videos. ### Parameters: - language_code: Language code, default is en. - country_code: Country code, default is us. - section: Section, default is Now, optional values are Music, Gaming, Movies. ### Returns: - Trending videos. # [示例/Example]

Example

  • Bearer Authentication (bearer):
from __future__ import print_function
import time
import tikhub_sdk_v2
from tikhub_sdk_v2.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = tikhub_sdk_v2.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearer
configuration = tikhub_sdk_v2.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with tikhub_sdk_v2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tikhub_sdk_v2.YouTubeWebAPIApi(api_client)
    language_code = 'en' # str | 语言代码/Language code (optional) (default to 'en')
country_code = 'us' # str | 国家代码/Country code (optional) (default to 'us')
section = 'Now' # str | 类型/Section (optional) (default to 'Now')

    try:
        # 获取趋势视频/Get trending videos
        api_response = api_instance.get_trending_videos_api_v1_youtube_web_get_trending_videos_get(language_code=language_code, country_code=country_code, section=section)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling YouTubeWebAPIApi->get_trending_videos_api_v1_youtube_web_get_trending_videos_get: %s\n" % e)

Parameters

Name Type Description Notes
language_code str 语言代码/Language code [optional] [default to 'en']
country_code str 国家代码/Country code [optional] [default to 'us']
section str 类型/Section [optional] [default to 'Now']

Return type

ResponseModel

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_trending_videos_api_v1_youtube_web_get_trending_videos_get_0

ResponseModel get_trending_videos_api_v1_youtube_web_get_trending_videos_get_0(language_code=language_code, country_code=country_code, section=section)

获取趋势视频/Get trending videos

[中文] ### 用途: - 获取趋势视频。 ### 参数: - language_code: 语言代码,默认为en。 - country_code: 国家代码,默认为us。 - section: 类型,默认为Now,可选值为Music, Gaming, Movies。 ### 返回: - 趋势视频。 # [English] ### Purpose: - Get trending videos. ### Parameters: - language_code: Language code, default is en. - country_code: Country code, default is us. - section: Section, default is Now, optional values are Music, Gaming, Movies. ### Returns: - Trending videos. # [示例/Example]

Example

  • Bearer Authentication (bearer):
from __future__ import print_function
import time
import tikhub_sdk_v2
from tikhub_sdk_v2.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = tikhub_sdk_v2.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearer
configuration = tikhub_sdk_v2.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with tikhub_sdk_v2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tikhub_sdk_v2.YouTubeWebAPIApi(api_client)
    language_code = 'en' # str | 语言代码/Language code (optional) (default to 'en')
country_code = 'us' # str | 国家代码/Country code (optional) (default to 'us')
section = 'Now' # str | 类型/Section (optional) (default to 'Now')

    try:
        # 获取趋势视频/Get trending videos
        api_response = api_instance.get_trending_videos_api_v1_youtube_web_get_trending_videos_get_0(language_code=language_code, country_code=country_code, section=section)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling YouTubeWebAPIApi->get_trending_videos_api_v1_youtube_web_get_trending_videos_get_0: %s\n" % e)

Parameters

Name Type Description Notes
language_code str 语言代码/Language code [optional] [default to 'en']
country_code str 国家代码/Country code [optional] [default to 'us']
section str 类型/Section [optional] [default to 'Now']

Return type

ResponseModel

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_video_comments_api_v1_youtube_web_get_video_comments_get

ResponseModel get_video_comments_api_v1_youtube_web_get_video_comments_get(video_id, continuation_token=continuation_token)

获取视频评论/Get video comments

[中文] ### 用途: - 获取单个视频的评论。 ### 参数: - video_id: 视频ID,从URL中获取,例如:https://www.youtube.com/watch?v=LuIL5JATZsc,这里的id就是LuIL5JATZsc。 - continuation_token: 用于继续获取评论的令牌。默认为None。 ### 返回: - 视频评论。 # [English] ### Purpose: - Get comments of a single video. ### Parameters: - id: Video ID, get it from the URL, for example: https://www.youtube.com/watch?v=LuIL5JATZsc, the id is LuIL5JATZsc. - continuation_token: Token to continue fetching comments. Default is None. ### Returns: - Video comments. # [示例/Example] id = "LuIL5JATZsc"

Example

  • Bearer Authentication (bearer):
from __future__ import print_function
import time
import tikhub_sdk_v2
from tikhub_sdk_v2.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = tikhub_sdk_v2.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearer
configuration = tikhub_sdk_v2.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with tikhub_sdk_v2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tikhub_sdk_v2.YouTubeWebAPIApi(api_client)
    video_id = 'LuIL5JATZsc' # str | 视频ID/Video ID
continuation_token = 'continuation_token_example' # str | 翻页令牌/Pagination token (optional)

    try:
        # 获取视频评论/Get video comments
        api_response = api_instance.get_video_comments_api_v1_youtube_web_get_video_comments_get(video_id, continuation_token=continuation_token)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling YouTubeWebAPIApi->get_video_comments_api_v1_youtube_web_get_video_comments_get: %s\n" % e)

Parameters

Name Type Description Notes
video_id str 视频ID/Video ID
continuation_token str 翻页令牌/Pagination token [optional]

Return type

ResponseModel

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_video_comments_api_v1_youtube_web_get_video_comments_get_0

ResponseModel get_video_comments_api_v1_youtube_web_get_video_comments_get_0(video_id, continuation_token=continuation_token)

获取视频评论/Get video comments

[中文] ### 用途: - 获取单个视频的评论。 ### 参数: - video_id: 视频ID,从URL中获取,例如:https://www.youtube.com/watch?v=LuIL5JATZsc,这里的id就是LuIL5JATZsc。 - continuation_token: 用于继续获取评论的令牌。默认为None。 ### 返回: - 视频评论。 # [English] ### Purpose: - Get comments of a single video. ### Parameters: - id: Video ID, get it from the URL, for example: https://www.youtube.com/watch?v=LuIL5JATZsc, the id is LuIL5JATZsc. - continuation_token: Token to continue fetching comments. Default is None. ### Returns: - Video comments. # [示例/Example] id = "LuIL5JATZsc"

Example

  • Bearer Authentication (bearer):
from __future__ import print_function
import time
import tikhub_sdk_v2
from tikhub_sdk_v2.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = tikhub_sdk_v2.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearer
configuration = tikhub_sdk_v2.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with tikhub_sdk_v2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tikhub_sdk_v2.YouTubeWebAPIApi(api_client)
    video_id = 'LuIL5JATZsc' # str | 视频ID/Video ID
continuation_token = 'continuation_token_example' # str | 翻页令牌/Pagination token (optional)

    try:
        # 获取视频评论/Get video comments
        api_response = api_instance.get_video_comments_api_v1_youtube_web_get_video_comments_get_0(video_id, continuation_token=continuation_token)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling YouTubeWebAPIApi->get_video_comments_api_v1_youtube_web_get_video_comments_get_0: %s\n" % e)

Parameters

Name Type Description Notes
video_id str 视频ID/Video ID
continuation_token str 翻页令牌/Pagination token [optional]

Return type

ResponseModel

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_video_info_api_v1_youtube_web_get_video_info_get

ResponseModel get_video_info_api_v1_youtube_web_get_video_info_get(video_id)

获取视频信息/Get video information

[中文] ### 用途: - 获取单个视频的信息,包括视频下载链接、标题、作者、发布日期、观看次数、点赞次数、不喜欢次数、评论次数、时长、描述等。 ### 参数: - video_id: 视频ID,从URL中获取,例如:https://www.youtube.com/watch?v=LuIL5JATZsc,这里的video_id就是LuIL5JATZsc。 ### 返回: - 视频信息。 # [English] ### Purpose: - Get information of a single video, including video download link, title, author, publish date, view count, like count, dislike count, comment count, duration, description, etc. ### Parameters: - video_id: Video ID, get it from the URL, for example: https://www.youtube.com/watch?v=LuIL5JATZsc, the id is LuIL5JATZsc. ### Returns: - Video information. # [示例/Example] video_id = "LuIL5JATZsc"

Example

  • Bearer Authentication (bearer):
from __future__ import print_function
import time
import tikhub_sdk_v2
from tikhub_sdk_v2.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = tikhub_sdk_v2.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearer
configuration = tikhub_sdk_v2.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with tikhub_sdk_v2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tikhub_sdk_v2.YouTubeWebAPIApi(api_client)
    video_id = 'LuIL5JATZsc' # str | 视频ID/Video ID

    try:
        # 获取视频信息/Get video information
        api_response = api_instance.get_video_info_api_v1_youtube_web_get_video_info_get(video_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling YouTubeWebAPIApi->get_video_info_api_v1_youtube_web_get_video_info_get: %s\n" % e)

Parameters

Name Type Description Notes
video_id str 视频ID/Video ID

Return type

ResponseModel

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_video_info_api_v1_youtube_web_get_video_info_get_0

ResponseModel get_video_info_api_v1_youtube_web_get_video_info_get_0(video_id)

获取视频信息/Get video information

[中文] ### 用途: - 获取单个视频的信息,包括视频下载链接、标题、作者、发布日期、观看次数、点赞次数、不喜欢次数、评论次数、时长、描述等。 ### 参数: - video_id: 视频ID,从URL中获取,例如:https://www.youtube.com/watch?v=LuIL5JATZsc,这里的video_id就是LuIL5JATZsc。 ### 返回: - 视频信息。 # [English] ### Purpose: - Get information of a single video, including video download link, title, author, publish date, view count, like count, dislike count, comment count, duration, description, etc. ### Parameters: - video_id: Video ID, get it from the URL, for example: https://www.youtube.com/watch?v=LuIL5JATZsc, the id is LuIL5JATZsc. ### Returns: - Video information. # [示例/Example] video_id = "LuIL5JATZsc"

Example

  • Bearer Authentication (bearer):
from __future__ import print_function
import time
import tikhub_sdk_v2
from tikhub_sdk_v2.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = tikhub_sdk_v2.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearer
configuration = tikhub_sdk_v2.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with tikhub_sdk_v2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tikhub_sdk_v2.YouTubeWebAPIApi(api_client)
    video_id = 'LuIL5JATZsc' # str | 视频ID/Video ID

    try:
        # 获取视频信息/Get video information
        api_response = api_instance.get_video_info_api_v1_youtube_web_get_video_info_get_0(video_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling YouTubeWebAPIApi->get_video_info_api_v1_youtube_web_get_video_info_get_0: %s\n" % e)

Parameters

Name Type Description Notes
video_id str 视频ID/Video ID

Return type

ResponseModel

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_video_subtitles_api_v1_youtube_web_get_video_subtitles_get

ResponseModel get_video_subtitles_api_v1_youtube_web_get_video_subtitles_get(video_id)

获取视频字幕/Get video subtitles

[中文] ### 用途: - 获取单个视频的字幕。 ### 参数: - video_id: 视频ID,从URL中获取,例如:https://www.youtube.com/watch?v=LuIL5JATZsc,这里的video_id就是LuIL5JATZsc。 ### 返回: - 视频字幕。 # [English] ### Purpose: - Get subtitles of a single video. ### Parameters: - video_id: Video ID, get it from the URL, for example: https://www.youtube.com/watch?v=LuIL5JATZsc, the id is LuIL5JATZsc. ### Returns: - Video subtitles. # [示例/Example] video_id = "LuIL5JATZsc"

Example

  • Bearer Authentication (bearer):
from __future__ import print_function
import time
import tikhub_sdk_v2
from tikhub_sdk_v2.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = tikhub_sdk_v2.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearer
configuration = tikhub_sdk_v2.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with tikhub_sdk_v2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tikhub_sdk_v2.YouTubeWebAPIApi(api_client)
    video_id = 'LuIL5JATZsc' # str | 视频ID/Video ID

    try:
        # 获取视频字幕/Get video subtitles
        api_response = api_instance.get_video_subtitles_api_v1_youtube_web_get_video_subtitles_get(video_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling YouTubeWebAPIApi->get_video_subtitles_api_v1_youtube_web_get_video_subtitles_get: %s\n" % e)

Parameters

Name Type Description Notes
video_id str 视频ID/Video ID

Return type

ResponseModel

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_video_subtitles_api_v1_youtube_web_get_video_subtitles_get_0

ResponseModel get_video_subtitles_api_v1_youtube_web_get_video_subtitles_get_0(video_id)

获取视频字幕/Get video subtitles

[中文] ### 用途: - 获取单个视频的字幕。 ### 参数: - video_id: 视频ID,从URL中获取,例如:https://www.youtube.com/watch?v=LuIL5JATZsc,这里的video_id就是LuIL5JATZsc。 ### 返回: - 视频字幕。 # [English] ### Purpose: - Get subtitles of a single video. ### Parameters: - video_id: Video ID, get it from the URL, for example: https://www.youtube.com/watch?v=LuIL5JATZsc, the id is LuIL5JATZsc. ### Returns: - Video subtitles. # [示例/Example] video_id = "LuIL5JATZsc"

Example

  • Bearer Authentication (bearer):
from __future__ import print_function
import time
import tikhub_sdk_v2
from tikhub_sdk_v2.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = tikhub_sdk_v2.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearer
configuration = tikhub_sdk_v2.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with tikhub_sdk_v2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tikhub_sdk_v2.YouTubeWebAPIApi(api_client)
    video_id = 'LuIL5JATZsc' # str | 视频ID/Video ID

    try:
        # 获取视频字幕/Get video subtitles
        api_response = api_instance.get_video_subtitles_api_v1_youtube_web_get_video_subtitles_get_0(video_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling YouTubeWebAPIApi->get_video_subtitles_api_v1_youtube_web_get_video_subtitles_get_0: %s\n" % e)

Parameters

Name Type Description Notes
video_id str 视频ID/Video ID

Return type

ResponseModel

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

search_channel_api_v1_youtube_web_search_channel_get

ResponseModel search_channel_api_v1_youtube_web_search_channel_get(channel_id, search_query, language_code=language_code, country_code=country_code, continuation_token=continuation_token)

搜索频道/Search channel

[中文] ### 用途: - 搜索频道。 ### 参数: - search_query: 搜索关键字。 - language_code: 语言代码,默认为en。 - country_code: 国家代码,默认为us。 - continuation_token: 用于继续获取搜索结果的令牌。默认为None。 ### 返回: - 搜索结果。 # [English] ### Purpose: - Search channel. ### Parameters: - search_query: Search keyword. - language_code: Language code, default is en. - country_code: Country code, default is us. - continuation_token: Token to continue fetching search results. Default is None. ### Returns: - Search results. # [示例/Example] channel_id = "UCXuqSBlHAE6Xw-yeJA0Tunw" search_query = "AMD"

Example

  • Bearer Authentication (bearer):
from __future__ import print_function
import time
import tikhub_sdk_v2
from tikhub_sdk_v2.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = tikhub_sdk_v2.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearer
configuration = tikhub_sdk_v2.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with tikhub_sdk_v2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tikhub_sdk_v2.YouTubeWebAPIApi(api_client)
    channel_id = 'UCXuqSBlHAE6Xw-yeJA0Tunw' # str | 频道ID/Channel ID
search_query = 'AMD' # str | 搜索关键字/Search keyword
language_code = 'en' # str | 语言代码/Language code (optional) (default to 'en')
country_code = 'us' # str | 国家代码/Country code (optional) (default to 'us')
continuation_token = 'continuation_token_example' # str | 翻页令牌/Pagination token (optional)

    try:
        # 搜索频道/Search channel
        api_response = api_instance.search_channel_api_v1_youtube_web_search_channel_get(channel_id, search_query, language_code=language_code, country_code=country_code, continuation_token=continuation_token)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling YouTubeWebAPIApi->search_channel_api_v1_youtube_web_search_channel_get: %s\n" % e)

Parameters

Name Type Description Notes
channel_id str 频道ID/Channel ID
search_query str 搜索关键字/Search keyword
language_code str 语言代码/Language code [optional] [default to 'en']
country_code str 国家代码/Country code [optional] [default to 'us']
continuation_token str 翻页令牌/Pagination token [optional]

Return type

ResponseModel

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

search_channel_api_v1_youtube_web_search_channel_get_0

ResponseModel search_channel_api_v1_youtube_web_search_channel_get_0(channel_id, search_query, language_code=language_code, country_code=country_code, continuation_token=continuation_token)

搜索频道/Search channel

[中文] ### 用途: - 搜索频道。 ### 参数: - search_query: 搜索关键字。 - language_code: 语言代码,默认为en。 - country_code: 国家代码,默认为us。 - continuation_token: 用于继续获取搜索结果的令牌。默认为None。 ### 返回: - 搜索结果。 # [English] ### Purpose: - Search channel. ### Parameters: - search_query: Search keyword. - language_code: Language code, default is en. - country_code: Country code, default is us. - continuation_token: Token to continue fetching search results. Default is None. ### Returns: - Search results. # [示例/Example] channel_id = "UCXuqSBlHAE6Xw-yeJA0Tunw" search_query = "AMD"

Example

  • Bearer Authentication (bearer):
from __future__ import print_function
import time
import tikhub_sdk_v2
from tikhub_sdk_v2.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = tikhub_sdk_v2.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearer
configuration = tikhub_sdk_v2.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with tikhub_sdk_v2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tikhub_sdk_v2.YouTubeWebAPIApi(api_client)
    channel_id = 'UCXuqSBlHAE6Xw-yeJA0Tunw' # str | 频道ID/Channel ID
search_query = 'AMD' # str | 搜索关键字/Search keyword
language_code = 'en' # str | 语言代码/Language code (optional) (default to 'en')
country_code = 'us' # str | 国家代码/Country code (optional) (default to 'us')
continuation_token = 'continuation_token_example' # str | 翻页令牌/Pagination token (optional)

    try:
        # 搜索频道/Search channel
        api_response = api_instance.search_channel_api_v1_youtube_web_search_channel_get_0(channel_id, search_query, language_code=language_code, country_code=country_code, continuation_token=continuation_token)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling YouTubeWebAPIApi->search_channel_api_v1_youtube_web_search_channel_get_0: %s\n" % e)

Parameters

Name Type Description Notes
channel_id str 频道ID/Channel ID
search_query str 搜索关键字/Search keyword
language_code str 语言代码/Language code [optional] [default to 'en']
country_code str 国家代码/Country code [optional] [default to 'us']
continuation_token str 翻页令牌/Pagination token [optional]

Return type

ResponseModel

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

search_video_api_v1_youtube_web_search_video_get

ResponseModel search_video_api_v1_youtube_web_search_video_get(search_query, language_code=language_code, order_by=order_by, country_code=country_code, continuation_token=continuation_token)

搜索视频/Search video

[中文] ### 用途: - 搜索视频。 ### 参数: - search_query: 搜索关键字。 - language_code: 语言代码,默认为en。 - order_by: 排序方式,默��为this_month。 - country_code: 国家代码,默认为us。 - continuation_token: 用于继续获取搜索结果的令牌。默认为None。 ### 返回: - 搜索结果。 # [English] ### Purpose: - Search video. ### Parameters: - search_query: Search keyword. - language_code: Language code, default is en. - order_by: Order by, default is this_month. - country_code: Country code, default is us. - continuation_token: Token to continue fetching search results. Default is None. ### Returns: - Search results. # [示例/Example] search_query = "Minecraft"

Example

  • Bearer Authentication (bearer):
from __future__ import print_function
import time
import tikhub_sdk_v2
from tikhub_sdk_v2.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = tikhub_sdk_v2.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearer
configuration = tikhub_sdk_v2.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with tikhub_sdk_v2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tikhub_sdk_v2.YouTubeWebAPIApi(api_client)
    search_query = 'Minecraft' # str | 搜索关键字/Search keyword
language_code = 'en' # str | 语言代码/Language code (optional) (default to 'en')
order_by = 'this_month' # str | 排序方式/Order by (optional) (default to 'this_month')
country_code = 'us' # str | 国家代码/Country code (optional) (default to 'us')
continuation_token = 'continuation_token_example' # str | 翻页令牌/Pagination token (optional)

    try:
        # 搜索视频/Search video
        api_response = api_instance.search_video_api_v1_youtube_web_search_video_get(search_query, language_code=language_code, order_by=order_by, country_code=country_code, continuation_token=continuation_token)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling YouTubeWebAPIApi->search_video_api_v1_youtube_web_search_video_get: %s\n" % e)

Parameters

Name Type Description Notes
search_query str 搜索关键字/Search keyword
language_code str 语言代码/Language code [optional] [default to 'en']
order_by str 排序方式/Order by [optional] [default to 'this_month']
country_code str 国家代码/Country code [optional] [default to 'us']
continuation_token str 翻页令牌/Pagination token [optional]

Return type

ResponseModel

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

search_video_api_v1_youtube_web_search_video_get_0

ResponseModel search_video_api_v1_youtube_web_search_video_get_0(search_query, language_code=language_code, order_by=order_by, country_code=country_code, continuation_token=continuation_token)

搜索视频/Search video

[中文] ### 用途: - 搜索视频。 ### 参数: - search_query: 搜索关键字。 - language_code: 语言代码,默认为en。 - order_by: 排序方式,默��为this_month。 - country_code: 国家代码,默认为us。 - continuation_token: 用于继续获取搜索结果的令牌。默认为None。 ### 返回: - 搜索结果。 # [English] ### Purpose: - Search video. ### Parameters: - search_query: Search keyword. - language_code: Language code, default is en. - order_by: Order by, default is this_month. - country_code: Country code, default is us. - continuation_token: Token to continue fetching search results. Default is None. ### Returns: - Search results. # [示例/Example] search_query = "Minecraft"

Example

  • Bearer Authentication (bearer):
from __future__ import print_function
import time
import tikhub_sdk_v2
from tikhub_sdk_v2.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = tikhub_sdk_v2.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearer
configuration = tikhub_sdk_v2.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with tikhub_sdk_v2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tikhub_sdk_v2.YouTubeWebAPIApi(api_client)
    search_query = 'Minecraft' # str | 搜索关键字/Search keyword
language_code = 'en' # str | 语言代码/Language code (optional) (default to 'en')
order_by = 'this_month' # str | 排序方式/Order by (optional) (default to 'this_month')
country_code = 'us' # str | 国家代码/Country code (optional) (default to 'us')
continuation_token = 'continuation_token_example' # str | 翻页令牌/Pagination token (optional)

    try:
        # 搜索视频/Search video
        api_response = api_instance.search_video_api_v1_youtube_web_search_video_get_0(search_query, language_code=language_code, order_by=order_by, country_code=country_code, continuation_token=continuation_token)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling YouTubeWebAPIApi->search_video_api_v1_youtube_web_search_video_get_0: %s\n" % e)

Parameters

Name Type Description Notes
search_query str 搜索关键字/Search keyword
language_code str 语言代码/Language code [optional] [default to 'en']
order_by str 排序方式/Order by [optional] [default to 'this_month']
country_code str 国家代码/Country code [optional] [default to 'us']
continuation_token str 翻页令牌/Pagination token [optional]

Return type

ResponseModel

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]