Class: ScrapeBadger::TikTokApi
- Inherits:
-
Object
- Object
- ScrapeBadger::TikTokApi
- Defined in:
- lib/scrapebadger/api/tik_tok_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ TikTokApi
constructor
A new instance of TikTokApi.
-
#tiktok_general_search(query, opts = {}) ⇒ Object
General search General TikTok search — video results from the Top feed.
-
#tiktok_general_search_with_http_info(query, opts = {}) ⇒ Array<(Object, Integer, Hash)>
General search General TikTok search — video results from the Top feed.
-
#tiktok_get_comment_replies(comment_id, video_id, opts = {}) ⇒ Object
Get comment replies Get replies to a TikTok comment (best-effort).
-
#tiktok_get_comment_replies_with_http_info(comment_id, video_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get comment replies Get replies to a TikTok comment (best-effort).
-
#tiktok_get_comments(video_id, opts = {}) ⇒ Object
Get comments Get top-level comments on a TikTok video.
-
#tiktok_get_comments_with_http_info(video_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get comments Get top-level comments on a TikTok video.
-
#tiktok_get_followers_deprecated(username, opts = {}) ⇒ Object
Get followers (deprecated) DEPRECATED — TikTok followers require an authenticated account session.
-
#tiktok_get_followers_deprecated_with_http_info(username, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get followers (deprecated) DEPRECATED — TikTok followers require an authenticated account session.
-
#tiktok_get_following_deprecated(username, opts = {}) ⇒ Object
Get following (deprecated) DEPRECATED — TikTok following requires an authenticated account session.
-
#tiktok_get_following_deprecated_with_http_info(username, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get following (deprecated) DEPRECATED — TikTok following requires an authenticated account session.
-
#tiktok_get_hashtag_detail(name, opts = {}) ⇒ Object
Get hashtag detail Get TikTok hashtag/challenge detail.
-
#tiktok_get_hashtag_detail_with_http_info(name, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get hashtag detail Get TikTok hashtag/challenge detail.
-
#tiktok_get_hashtag_videos(name, opts = {}) ⇒ Object
Get hashtag videos Get videos tagged with a TikTok hashtag.
-
#tiktok_get_hashtag_videos_with_http_info(name, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get hashtag videos Get videos tagged with a TikTok hashtag.
-
#tiktok_get_liked_videos_deprecated(username, opts = {}) ⇒ Object
Get liked videos (deprecated) DEPRECATED — TikTok liked videos require an authenticated account session.
-
#tiktok_get_liked_videos_deprecated_with_http_info(username, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get liked videos (deprecated) DEPRECATED — TikTok liked videos require an authenticated account session.
-
#tiktok_get_music_sound_detail(music_id, opts = {}) ⇒ Object
Get music/sound detail Get TikTok sound/music detail.
-
#tiktok_get_music_sound_detail_with_http_info(music_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get music/sound detail Get TikTok sound/music detail.
-
#tiktok_get_music_videos(music_id, opts = {}) ⇒ Object
Get music videos Get videos using a given TikTok sound.
-
#tiktok_get_music_videos_with_http_info(music_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get music videos Get videos using a given TikTok sound.
-
#tiktok_get_oembed_metadata(url, opts = {}) ⇒ Object
Get oEmbed metadata Get cheap unauthenticated oEmbed metadata for a TikTok URL.
-
#tiktok_get_oembed_metadata_with_http_info(url, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get oEmbed metadata Get cheap unauthenticated oEmbed metadata for a TikTok URL.
-
#tiktok_get_related_videos(video_id, opts = {}) ⇒ Object
Get related videos Get TikTok's related videos for a given video.
-
#tiktok_get_related_videos_with_http_info(video_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get related videos Get TikTok's related videos for a given video.
-
#tiktok_get_reposts(username, opts = {}) ⇒ Object
Get reposts Get videos a TikTok user has reposted.
-
#tiktok_get_reposts_with_http_info(username, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get reposts Get videos a TikTok user has reposted.
-
#tiktok_get_transcript(video_id, opts = {}) ⇒ Object
Get transcript Get subtitle/caption tracks for a TikTok video.
-
#tiktok_get_transcript_with_http_info(video_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get transcript Get subtitle/caption tracks for a TikTok video.
-
#tiktok_get_user_profile(username, opts = {}) ⇒ Object
Get user profile Get a TikTok user's full profile.
-
#tiktok_get_user_profile_with_http_info(username, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get user profile Get a TikTok user's full profile.
-
#tiktok_get_user_videos(username, opts = {}) ⇒ Object
Get user videos Get a TikTok user's posted videos.
-
#tiktok_get_user_videos_with_http_info(username, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get user videos Get a TikTok user's posted videos.
-
#tiktok_get_video_detail(video_id, opts = {}) ⇒ Object
Get video detail Get full metadata for a single TikTok video/post.
-
#tiktok_get_video_detail_with_http_info(video_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get video detail Get full metadata for a single TikTok video/post.
-
#tiktok_health_check(opts = {}) ⇒ Object
Health check Check health of the TikTok scraper service.
-
#tiktok_health_check_head(opts = {}) ⇒ Object
Health check Check health of the TikTok scraper service.
-
#tiktok_health_check_head_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Health check Check health of the TikTok scraper service.
-
#tiktok_health_check_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Health check Check health of the TikTok scraper service.
-
#tiktok_list_regions(opts = {}) ⇒ Object
List regions List supported TikTok content regions.
-
#tiktok_list_regions_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
List regions List supported TikTok content regions.
-
#tiktok_search_hashtags(query, opts = {}) ⇒ Object
Search hashtags Search TikTok hashtags by keyword.
-
#tiktok_search_hashtags_with_http_info(query, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Search hashtags Search TikTok hashtags by keyword.
-
#tiktok_search_the_tiktok_ad_library(opts = {}) ⇒ Object
Search the TikTok Ad Library Search TikTok's Commercial Content Library (ad transparency) by keyword or advertiser.
-
#tiktok_search_the_tiktok_ad_library_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Search the TikTok Ad Library Search TikTok's Commercial Content Library (ad transparency) by keyword or advertiser.
-
#tiktok_search_users(query, opts = {}) ⇒ Object
Search users Search TikTok users by keyword.
-
#tiktok_search_users_with_http_info(query, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Search users Search TikTok users by keyword.
-
#tiktok_search_videos(query, opts = {}) ⇒ Object
Search videos Search TikTok videos by keyword.
-
#tiktok_search_videos_with_http_info(query, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Search videos Search TikTok videos by keyword.
-
#tiktok_trending_hashtags(opts = {}) ⇒ Object
Trending hashtags Get trending hashtags (mobile Discover surface — view_count + creators).
-
#tiktok_trending_hashtags_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Trending hashtags Get trending hashtags (mobile Discover surface — view_count + creators).
-
#tiktok_trending_songs(opts = {}) ⇒ Object
Trending songs Get trending songs/sounds (mobile hot-music feed — ranked by usage).
-
#tiktok_trending_songs_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Trending songs Get trending songs/sounds (mobile hot-music feed — ranked by usage).
-
#tiktok_trending_videos(opts = {}) ⇒ Object
Trending videos Get trending videos from the TikTok Explore feed.
-
#tiktok_trending_videos_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Trending videos Get trending videos from the TikTok Explore feed.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#tiktok_general_search(query, opts = {}) ⇒ Object
General search General TikTok search — video results from the Top feed.
30 31 32 33 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 30 def tiktok_general_search(query, opts = {}) data, _status_code, _headers = tiktok_general_search_with_http_info(query, opts) data end |
#tiktok_general_search_with_http_info(query, opts = {}) ⇒ Array<(Object, Integer, Hash)>
General search General TikTok search — video results from the Top feed.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 43 def tiktok_general_search_with_http_info(query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_general_search ...' end # verify the required parameter 'query' is set if @api_client.config.client_side_validation && query.nil? fail ArgumentError, "Missing the required parameter 'query' when calling TikTokApi.tiktok_general_search" end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] > 50 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_general_search, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] < 1 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_general_search, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/tiktok/search' # query parameters query_params = opts[:query_params] || {} query_params[:'query'] = query query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_general_search", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_general_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_get_comment_replies(comment_id, video_id, opts = {}) ⇒ Object
Get comment replies Get replies to a TikTok comment (best-effort).
112 113 114 115 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 112 def tiktok_get_comment_replies(comment_id, video_id, opts = {}) data, _status_code, _headers = tiktok_get_comment_replies_with_http_info(comment_id, video_id, opts) data end |
#tiktok_get_comment_replies_with_http_info(comment_id, video_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get comment replies Get replies to a TikTok comment (best-effort).
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 126 def tiktok_get_comment_replies_with_http_info(comment_id, video_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_get_comment_replies ...' end # verify the required parameter 'comment_id' is set if @api_client.config.client_side_validation && comment_id.nil? fail ArgumentError, "Missing the required parameter 'comment_id' when calling TikTokApi.tiktok_get_comment_replies" end # verify the required parameter 'video_id' is set if @api_client.config.client_side_validation && video_id.nil? fail ArgumentError, "Missing the required parameter 'video_id' when calling TikTokApi.tiktok_get_comment_replies" end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] > 50 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_get_comment_replies, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] < 1 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_get_comment_replies, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/tiktok/comments/{comment_id}/replies'.sub('{' + 'comment_id' + '}', CGI.escape(comment_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'video_id'] = video_id query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_get_comment_replies", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_get_comment_replies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_get_comments(video_id, opts = {}) ⇒ Object
Get comments Get top-level comments on a TikTok video.
198 199 200 201 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 198 def tiktok_get_comments(video_id, opts = {}) data, _status_code, _headers = tiktok_get_comments_with_http_info(video_id, opts) data end |
#tiktok_get_comments_with_http_info(video_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get comments Get top-level comments on a TikTok video.
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 211 def tiktok_get_comments_with_http_info(video_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_get_comments ...' end # verify the required parameter 'video_id' is set if @api_client.config.client_side_validation && video_id.nil? fail ArgumentError, "Missing the required parameter 'video_id' when calling TikTokApi.tiktok_get_comments" end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] > 50 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_get_comments, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] < 1 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_get_comments, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/tiktok/videos/{video_id}/comments'.sub('{' + 'video_id' + '}', CGI.escape(video_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_get_comments", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_get_comments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_get_followers_deprecated(username, opts = {}) ⇒ Object
Get followers (deprecated) DEPRECATED — TikTok followers require an authenticated account session. Returns HTTP 410.
277 278 279 280 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 277 def tiktok_get_followers_deprecated(username, opts = {}) data, _status_code, _headers = tiktok_get_followers_deprecated_with_http_info(username, opts) data end |
#tiktok_get_followers_deprecated_with_http_info(username, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get followers (deprecated) DEPRECATED — TikTok followers require an authenticated account session. Returns HTTP 410.
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 289 def tiktok_get_followers_deprecated_with_http_info(username, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_get_followers_deprecated ...' end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling TikTokApi.tiktok_get_followers_deprecated" end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] > 50 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_get_followers_deprecated, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] < 1 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_get_followers_deprecated, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/tiktok/users/{username}/followers'.sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_get_followers_deprecated", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_get_followers_deprecated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_get_following_deprecated(username, opts = {}) ⇒ Object
Get following (deprecated) DEPRECATED — TikTok following requires an authenticated account session. Returns HTTP 410.
354 355 356 357 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 354 def tiktok_get_following_deprecated(username, opts = {}) data, _status_code, _headers = tiktok_get_following_deprecated_with_http_info(username, opts) data end |
#tiktok_get_following_deprecated_with_http_info(username, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get following (deprecated) DEPRECATED — TikTok following requires an authenticated account session. Returns HTTP 410.
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 366 def tiktok_get_following_deprecated_with_http_info(username, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_get_following_deprecated ...' end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling TikTokApi.tiktok_get_following_deprecated" end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] > 50 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_get_following_deprecated, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] < 1 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_get_following_deprecated, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/tiktok/users/{username}/following'.sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_get_following_deprecated", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_get_following_deprecated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_get_hashtag_detail(name, opts = {}) ⇒ Object
Get hashtag detail Get TikTok hashtag/challenge detail.
430 431 432 433 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 430 def tiktok_get_hashtag_detail(name, opts = {}) data, _status_code, _headers = tiktok_get_hashtag_detail_with_http_info(name, opts) data end |
#tiktok_get_hashtag_detail_with_http_info(name, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get hashtag detail Get TikTok hashtag/challenge detail.
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 441 def tiktok_get_hashtag_detail_with_http_info(name, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_get_hashtag_detail ...' end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? fail ArgumentError, "Missing the required parameter 'name' when calling TikTokApi.tiktok_get_hashtag_detail" end # resource path local_var_path = '/v1/tiktok/hashtags/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_get_hashtag_detail", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_get_hashtag_detail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_get_hashtag_videos(name, opts = {}) ⇒ Object
Get hashtag videos Get videos tagged with a TikTok hashtag.
498 499 500 501 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 498 def tiktok_get_hashtag_videos(name, opts = {}) data, _status_code, _headers = tiktok_get_hashtag_videos_with_http_info(name, opts) data end |
#tiktok_get_hashtag_videos_with_http_info(name, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get hashtag videos Get videos tagged with a TikTok hashtag.
511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 511 def tiktok_get_hashtag_videos_with_http_info(name, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_get_hashtag_videos ...' end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? fail ArgumentError, "Missing the required parameter 'name' when calling TikTokApi.tiktok_get_hashtag_videos" end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] > 50 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_get_hashtag_videos, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] < 1 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_get_hashtag_videos, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/tiktok/hashtags/{name}/videos'.sub('{' + 'name' + '}', CGI.escape(name.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_get_hashtag_videos", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_get_hashtag_videos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_get_liked_videos_deprecated(username, opts = {}) ⇒ Object
Get liked videos (deprecated) DEPRECATED — TikTok liked videos require an authenticated account session. Returns HTTP 410.
577 578 579 580 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 577 def tiktok_get_liked_videos_deprecated(username, opts = {}) data, _status_code, _headers = tiktok_get_liked_videos_deprecated_with_http_info(username, opts) data end |
#tiktok_get_liked_videos_deprecated_with_http_info(username, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get liked videos (deprecated) DEPRECATED — TikTok liked videos require an authenticated account session. Returns HTTP 410.
589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 589 def tiktok_get_liked_videos_deprecated_with_http_info(username, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_get_liked_videos_deprecated ...' end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling TikTokApi.tiktok_get_liked_videos_deprecated" end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] > 50 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_get_liked_videos_deprecated, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] < 1 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_get_liked_videos_deprecated, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/tiktok/users/{username}/liked'.sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_get_liked_videos_deprecated", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_get_liked_videos_deprecated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_get_music_sound_detail(music_id, opts = {}) ⇒ Object
Get music/sound detail Get TikTok sound/music detail.
653 654 655 656 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 653 def tiktok_get_music_sound_detail(music_id, opts = {}) data, _status_code, _headers = tiktok_get_music_sound_detail_with_http_info(music_id, opts) data end |
#tiktok_get_music_sound_detail_with_http_info(music_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get music/sound detail Get TikTok sound/music detail.
664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 664 def tiktok_get_music_sound_detail_with_http_info(music_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_get_music_sound_detail ...' end # verify the required parameter 'music_id' is set if @api_client.config.client_side_validation && music_id.nil? fail ArgumentError, "Missing the required parameter 'music_id' when calling TikTokApi.tiktok_get_music_sound_detail" end # resource path local_var_path = '/v1/tiktok/music/{music_id}'.sub('{' + 'music_id' + '}', CGI.escape(music_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_get_music_sound_detail", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_get_music_sound_detail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_get_music_videos(music_id, opts = {}) ⇒ Object
Get music videos Get videos using a given TikTok sound.
721 722 723 724 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 721 def tiktok_get_music_videos(music_id, opts = {}) data, _status_code, _headers = tiktok_get_music_videos_with_http_info(music_id, opts) data end |
#tiktok_get_music_videos_with_http_info(music_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get music videos Get videos using a given TikTok sound.
734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 734 def tiktok_get_music_videos_with_http_info(music_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_get_music_videos ...' end # verify the required parameter 'music_id' is set if @api_client.config.client_side_validation && music_id.nil? fail ArgumentError, "Missing the required parameter 'music_id' when calling TikTokApi.tiktok_get_music_videos" end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] > 50 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_get_music_videos, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] < 1 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_get_music_videos, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/tiktok/music/{music_id}/videos'.sub('{' + 'music_id' + '}', CGI.escape(music_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_get_music_videos", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_get_music_videos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_get_oembed_metadata(url, opts = {}) ⇒ Object
Get oEmbed metadata Get cheap unauthenticated oEmbed metadata for a TikTok URL.
799 800 801 802 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 799 def (url, opts = {}) data, _status_code, _headers = (url, opts) data end |
#tiktok_get_oembed_metadata_with_http_info(url, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get oEmbed metadata Get cheap unauthenticated oEmbed metadata for a TikTok URL.
810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 810 def (url, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_get_oembed_metadata ...' end # verify the required parameter 'url' is set if @api_client.config.client_side_validation && url.nil? fail ArgumentError, "Missing the required parameter 'url' when calling TikTokApi.tiktok_get_oembed_metadata" end # resource path local_var_path = '/v1/tiktok/oembed' # query parameters query_params = opts[:query_params] || {} query_params[:'url'] = url query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_get_oembed_metadata", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_get_oembed_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_get_related_videos(video_id, opts = {}) ⇒ Object
Get related videos Get TikTok's related videos for a given video.
867 868 869 870 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 867 def (video_id, opts = {}) data, _status_code, _headers = (video_id, opts) data end |
#tiktok_get_related_videos_with_http_info(video_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get related videos Get TikTok's related videos for a given video.
879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 879 def (video_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_get_related_videos ...' end # verify the required parameter 'video_id' is set if @api_client.config.client_side_validation && video_id.nil? fail ArgumentError, "Missing the required parameter 'video_id' when calling TikTokApi.tiktok_get_related_videos" end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] > 50 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_get_related_videos, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] < 1 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_get_related_videos, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/tiktok/videos/{video_id}/related'.sub('{' + 'video_id' + '}', CGI.escape(video_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_get_related_videos", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_get_related_videos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_get_reposts(username, opts = {}) ⇒ Object
Get reposts Get videos a TikTok user has reposted.
944 945 946 947 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 944 def tiktok_get_reposts(username, opts = {}) data, _status_code, _headers = tiktok_get_reposts_with_http_info(username, opts) data end |
#tiktok_get_reposts_with_http_info(username, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get reposts Get videos a TikTok user has reposted.
956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 956 def tiktok_get_reposts_with_http_info(username, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_get_reposts ...' end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling TikTokApi.tiktok_get_reposts" end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] > 50 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_get_reposts, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] < 1 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_get_reposts, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/tiktok/users/{username}/reposts'.sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_get_reposts", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_get_reposts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_get_transcript(video_id, opts = {}) ⇒ Object
Get transcript Get subtitle/caption tracks for a TikTok video.
1020 1021 1022 1023 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1020 def tiktok_get_transcript(video_id, opts = {}) data, _status_code, _headers = tiktok_get_transcript_with_http_info(video_id, opts) data end |
#tiktok_get_transcript_with_http_info(video_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get transcript Get subtitle/caption tracks for a TikTok video.
1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1031 def tiktok_get_transcript_with_http_info(video_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_get_transcript ...' end # verify the required parameter 'video_id' is set if @api_client.config.client_side_validation && video_id.nil? fail ArgumentError, "Missing the required parameter 'video_id' when calling TikTokApi.tiktok_get_transcript" end # resource path local_var_path = '/v1/tiktok/videos/{video_id}/transcript'.sub('{' + 'video_id' + '}', CGI.escape(video_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_get_transcript", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_get_transcript\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_get_user_profile(username, opts = {}) ⇒ Object
Get user profile Get a TikTok user's full profile.
1086 1087 1088 1089 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1086 def tiktok_get_user_profile(username, opts = {}) data, _status_code, _headers = tiktok_get_user_profile_with_http_info(username, opts) data end |
#tiktok_get_user_profile_with_http_info(username, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get user profile Get a TikTok user's full profile.
1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1097 def tiktok_get_user_profile_with_http_info(username, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_get_user_profile ...' end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling TikTokApi.tiktok_get_user_profile" end # resource path local_var_path = '/v1/tiktok/users/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_get_user_profile", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_get_user_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_get_user_videos(username, opts = {}) ⇒ Object
Get user videos Get a TikTok user's posted videos.
1154 1155 1156 1157 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1154 def tiktok_get_user_videos(username, opts = {}) data, _status_code, _headers = tiktok_get_user_videos_with_http_info(username, opts) data end |
#tiktok_get_user_videos_with_http_info(username, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get user videos Get a TikTok user's posted videos.
1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1167 def tiktok_get_user_videos_with_http_info(username, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_get_user_videos ...' end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling TikTokApi.tiktok_get_user_videos" end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] > 50 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_get_user_videos, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] < 1 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_get_user_videos, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/tiktok/users/{username}/videos'.sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_get_user_videos", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_get_user_videos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_get_video_detail(video_id, opts = {}) ⇒ Object
Get video detail Get full metadata for a single TikTok video/post.
1233 1234 1235 1236 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1233 def tiktok_get_video_detail(video_id, opts = {}) data, _status_code, _headers = tiktok_get_video_detail_with_http_info(video_id, opts) data end |
#tiktok_get_video_detail_with_http_info(video_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get video detail Get full metadata for a single TikTok video/post.
1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1245 def tiktok_get_video_detail_with_http_info(video_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_get_video_detail ...' end # verify the required parameter 'video_id' is set if @api_client.config.client_side_validation && video_id.nil? fail ArgumentError, "Missing the required parameter 'video_id' when calling TikTokApi.tiktok_get_video_detail" end # resource path local_var_path = '/v1/tiktok/videos/{video_id}'.sub('{' + 'video_id' + '}', CGI.escape(video_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? query_params[:'username'] = opts[:'username'] if !opts[:'username'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_get_video_detail", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_get_video_detail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_health_check(opts = {}) ⇒ Object
Health check Check health of the TikTok scraper service.
1299 1300 1301 1302 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1299 def tiktok_health_check(opts = {}) data, _status_code, _headers = tiktok_health_check_with_http_info(opts) data end |
#tiktok_health_check_head(opts = {}) ⇒ Object
Health check Check health of the TikTok scraper service.
1356 1357 1358 1359 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1356 def tiktok_health_check_head(opts = {}) data, _status_code, _headers = tiktok_health_check_head_with_http_info(opts) data end |
#tiktok_health_check_head_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Health check Check health of the TikTok scraper service.
1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1365 def tiktok_health_check_head_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_health_check_head ...' end # resource path local_var_path = '/v1/tiktok/health' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_health_check_head", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:HEAD, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_health_check_head\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_health_check_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Health check Check health of the TikTok scraper service.
1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1308 def tiktok_health_check_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_health_check ...' end # resource path local_var_path = '/v1/tiktok/health' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_health_check", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_health_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_list_regions(opts = {}) ⇒ Object
List regions List supported TikTok content regions.
1413 1414 1415 1416 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1413 def tiktok_list_regions(opts = {}) data, _status_code, _headers = tiktok_list_regions_with_http_info(opts) data end |
#tiktok_list_regions_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
List regions List supported TikTok content regions.
1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1422 def tiktok_list_regions_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_list_regions ...' end # resource path local_var_path = '/v1/tiktok/regions' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_list_regions", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_list_regions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_search_hashtags(query, opts = {}) ⇒ Object
Search hashtags Search TikTok hashtags by keyword.
1474 1475 1476 1477 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1474 def (query, opts = {}) data, _status_code, _headers = (query, opts) data end |
#tiktok_search_hashtags_with_http_info(query, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Search hashtags Search TikTok hashtags by keyword.
1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1487 def (query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_search_hashtags ...' end # verify the required parameter 'query' is set if @api_client.config.client_side_validation && query.nil? fail ArgumentError, "Missing the required parameter 'query' when calling TikTokApi.tiktok_search_hashtags" end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] > 50 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_search_hashtags, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] < 1 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_search_hashtags, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/tiktok/search/hashtags' # query parameters query_params = opts[:query_params] || {} query_params[:'query'] = query query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_search_hashtags", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_search_hashtags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_search_the_tiktok_ad_library(opts = {}) ⇒ Object
Search the TikTok Ad Library Search TikTok's Commercial Content Library (ad transparency) by keyword or advertiser.
1559 1560 1561 1562 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1559 def tiktok_search_the_tiktok_ad_library(opts = {}) data, _status_code, _headers = tiktok_search_the_tiktok_ad_library_with_http_info(opts) data end |
#tiktok_search_the_tiktok_ad_library_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Search the TikTok Ad Library Search TikTok's Commercial Content Library (ad transparency) by keyword or advertiser.
1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1576 def tiktok_search_the_tiktok_ad_library_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_search_the_tiktok_ad_library ...' end if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] > 365 fail ArgumentError, 'invalid value for "opts[:"days"]" when calling TikTokApi.tiktok_search_the_tiktok_ad_library, must be smaller than or equal to 365.' end if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] < 1 fail ArgumentError, 'invalid value for "opts[:"days"]" when calling TikTokApi.tiktok_search_the_tiktok_ad_library, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling TikTokApi.tiktok_search_the_tiktok_ad_library, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] > 50 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_search_the_tiktok_ad_library, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] < 1 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_search_the_tiktok_ad_library, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/tiktok/ads/search' # query parameters query_params = opts[:query_params] || {} query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil? query_params[:'advertiser_id'] = opts[:'advertiser_id'] if !opts[:'advertiser_id'].nil? query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? query_params[:'days'] = opts[:'days'] if !opts[:'days'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'search_id'] = opts[:'search_id'] if !opts[:'search_id'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_search_the_tiktok_ad_library", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_search_the_tiktok_ad_library\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_search_users(query, opts = {}) ⇒ Object
Search users Search TikTok users by keyword.
1656 1657 1658 1659 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1656 def tiktok_search_users(query, opts = {}) data, _status_code, _headers = tiktok_search_users_with_http_info(query, opts) data end |
#tiktok_search_users_with_http_info(query, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Search users Search TikTok users by keyword.
1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1669 def tiktok_search_users_with_http_info(query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_search_users ...' end # verify the required parameter 'query' is set if @api_client.config.client_side_validation && query.nil? fail ArgumentError, "Missing the required parameter 'query' when calling TikTokApi.tiktok_search_users" end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] > 50 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_search_users, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] < 1 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_search_users, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/tiktok/search/users' # query parameters query_params = opts[:query_params] || {} query_params[:'query'] = query query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_search_users", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_search_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_search_videos(query, opts = {}) ⇒ Object
Search videos Search TikTok videos by keyword.
1737 1738 1739 1740 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1737 def tiktok_search_videos(query, opts = {}) data, _status_code, _headers = tiktok_search_videos_with_http_info(query, opts) data end |
#tiktok_search_videos_with_http_info(query, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Search videos Search TikTok videos by keyword.
1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1750 def tiktok_search_videos_with_http_info(query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_search_videos ...' end # verify the required parameter 'query' is set if @api_client.config.client_side_validation && query.nil? fail ArgumentError, "Missing the required parameter 'query' when calling TikTokApi.tiktok_search_videos" end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] > 50 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_search_videos, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] < 1 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_search_videos, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/tiktok/search/videos' # query parameters query_params = opts[:query_params] || {} query_params[:'query'] = query query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_search_videos", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_search_videos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_trending_hashtags(opts = {}) ⇒ Object
Trending hashtags Get trending hashtags (mobile Discover surface — view_count + creators).
1817 1818 1819 1820 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1817 def (opts = {}) data, _status_code, _headers = (opts) data end |
#tiktok_trending_hashtags_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Trending hashtags Get trending hashtags (mobile Discover surface — view_count + creators).
1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1829 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_trending_hashtags ...' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] > 50 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_trending_hashtags, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] < 1 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_trending_hashtags, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/tiktok/trending/hashtags' # query parameters query_params = opts[:query_params] || {} query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_trending_hashtags", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_trending_hashtags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_trending_songs(opts = {}) ⇒ Object
Trending songs Get trending songs/sounds (mobile hot-music feed — ranked by usage).
1891 1892 1893 1894 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1891 def tiktok_trending_songs(opts = {}) data, _status_code, _headers = tiktok_trending_songs_with_http_info(opts) data end |
#tiktok_trending_songs_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Trending songs Get trending songs/sounds (mobile hot-music feed — ranked by usage).
1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1903 def tiktok_trending_songs_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_trending_songs ...' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] > 50 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_trending_songs, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] < 1 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_trending_songs, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/tiktok/trending/songs' # query parameters query_params = opts[:query_params] || {} query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_trending_songs", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_trending_songs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#tiktok_trending_videos(opts = {}) ⇒ Object
Trending videos Get trending videos from the TikTok Explore feed.
1964 1965 1966 1967 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1964 def tiktok_trending_videos(opts = {}) data, _status_code, _headers = tiktok_trending_videos_with_http_info(opts) data end |
#tiktok_trending_videos_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Trending videos Get trending videos from the TikTok Explore feed.
1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 |
# File 'lib/scrapebadger/api/tik_tok_api.rb', line 1975 def tiktok_trending_videos_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TikTokApi.tiktok_trending_videos ...' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] > 50 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_trending_videos, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] < 1 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling TikTokApi.tiktok_trending_videos, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/tiktok/trending/videos' # query parameters query_params = opts[:query_params] || {} query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TikTokApi.tiktok_trending_videos", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TikTokApi#tiktok_trending_videos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |