Skip to content

Latest commit

 

History

History
503 lines (360 loc) · 13.3 KB

File metadata and controls

503 lines (360 loc) · 13.3 KB

Unifapi::ThreadsApi

All URIs are relative to https://api.unifapi.com

Method HTTP request Description
threads_search_profiles_get GET /threads/search/profiles Search Threads users by keyword
threads_search_recent_get GET /threads/search/recent Search recent Threads posts
threads_search_top_get GET /threads/search/top Search top Threads posts
threads_users_username_get GET /threads/users/{username} Get a Threads user profile by username
threads_users_username_posts_get GET /threads/users/{username}/posts List Threads posts authored by a user
threads_users_username_replies_get GET /threads/users/{username}/replies List Threads replies authored by a user
threads_users_username_reposts_get GET /threads/users/{username}/reposts List Threads reposts by a user

threads_search_profiles_get

threads_search_profiles_get(q)

Search Threads users by keyword

Examples

require 'time'
require 'unifapi'
# setup authorization
Unifapi.configure do |config|
  # Configure Bearer authorization: bearerAuth
  config.access_token = 'YOUR_BEARER_TOKEN'
end

api_instance = Unifapi::ThreadsApi.new
q = 'q_example' # String | Search keyword.

begin
  # Search Threads users by keyword
  result = api_instance.threads_search_profiles_get(q)
  p result
rescue Unifapi::ApiError => e
  puts "Error when calling ThreadsApi->threads_search_profiles_get: #{e}"
end

Using the threads_search_profiles_get_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> threads_search_profiles_get_with_http_info(q)

begin
  # Search Threads users by keyword
  data, status_code, headers = api_instance.threads_search_profiles_get_with_http_info(q)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <ThreadsSearchProfilesGet200Response>
rescue Unifapi::ApiError => e
  puts "Error when calling ThreadsApi->threads_search_profiles_get_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
q String Search keyword.

Return type

ThreadsSearchProfilesGet200Response

Authorization

bearerAuth

HTTP request headers

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

threads_search_recent_get

threads_search_recent_get(q, opts)

Search recent Threads posts

Examples

require 'time'
require 'unifapi'
# setup authorization
Unifapi.configure do |config|
  # Configure Bearer authorization: bearerAuth
  config.access_token = 'YOUR_BEARER_TOKEN'
end

api_instance = Unifapi::ThreadsApi.new
q = 'q_example' # String | Search keyword.
opts = {
  cursor: 'cursor_example' # String | 
}

begin
  # Search recent Threads posts
  result = api_instance.threads_search_recent_get(q, opts)
  p result
rescue Unifapi::ApiError => e
  puts "Error when calling ThreadsApi->threads_search_recent_get: #{e}"
end

Using the threads_search_recent_get_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> threads_search_recent_get_with_http_info(q, opts)

begin
  # Search recent Threads posts
  data, status_code, headers = api_instance.threads_search_recent_get_with_http_info(q, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <ThreadsSearchRecentGet200Response>
rescue Unifapi::ApiError => e
  puts "Error when calling ThreadsApi->threads_search_recent_get_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
q String Search keyword.
cursor String [optional]

Return type

ThreadsSearchRecentGet200Response

Authorization

bearerAuth

HTTP request headers

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

threads_search_top_get

threads_search_top_get(q, opts)

Search top Threads posts

Examples

require 'time'
require 'unifapi'
# setup authorization
Unifapi.configure do |config|
  # Configure Bearer authorization: bearerAuth
  config.access_token = 'YOUR_BEARER_TOKEN'
end

api_instance = Unifapi::ThreadsApi.new
q = 'q_example' # String | Search keyword.
opts = {
  cursor: 'cursor_example' # String | 
}

begin
  # Search top Threads posts
  result = api_instance.threads_search_top_get(q, opts)
  p result
rescue Unifapi::ApiError => e
  puts "Error when calling ThreadsApi->threads_search_top_get: #{e}"
end

Using the threads_search_top_get_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> threads_search_top_get_with_http_info(q, opts)

begin
  # Search top Threads posts
  data, status_code, headers = api_instance.threads_search_top_get_with_http_info(q, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <ThreadsSearchRecentGet200Response>
rescue Unifapi::ApiError => e
  puts "Error when calling ThreadsApi->threads_search_top_get_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
q String Search keyword.
cursor String [optional]

Return type

ThreadsSearchRecentGet200Response

Authorization

bearerAuth

HTTP request headers

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

threads_users_username_get

threads_users_username_get(username)

Get a Threads user profile by username

Examples

require 'time'
require 'unifapi'
# setup authorization
Unifapi.configure do |config|
  # Configure Bearer authorization: bearerAuth
  config.access_token = 'YOUR_BEARER_TOKEN'
end

api_instance = Unifapi::ThreadsApi.new
username = 'username_example' # String | 

begin
  # Get a Threads user profile by username
  result = api_instance.threads_users_username_get(username)
  p result
rescue Unifapi::ApiError => e
  puts "Error when calling ThreadsApi->threads_users_username_get: #{e}"
end

Using the threads_users_username_get_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> threads_users_username_get_with_http_info(username)

begin
  # Get a Threads user profile by username
  data, status_code, headers = api_instance.threads_users_username_get_with_http_info(username)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <ThreadsUsersUsernameGet200Response>
rescue Unifapi::ApiError => e
  puts "Error when calling ThreadsApi->threads_users_username_get_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
username String

Return type

ThreadsUsersUsernameGet200Response

Authorization

bearerAuth

HTTP request headers

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

threads_users_username_posts_get

threads_users_username_posts_get(username, opts)

List Threads posts authored by a user

Examples

require 'time'
require 'unifapi'
# setup authorization
Unifapi.configure do |config|
  # Configure Bearer authorization: bearerAuth
  config.access_token = 'YOUR_BEARER_TOKEN'
end

api_instance = Unifapi::ThreadsApi.new
username = 'username_example' # String | 
opts = {
  cursor: 'cursor_example' # String | 
}

begin
  # List Threads posts authored by a user
  result = api_instance.threads_users_username_posts_get(username, opts)
  p result
rescue Unifapi::ApiError => e
  puts "Error when calling ThreadsApi->threads_users_username_posts_get: #{e}"
end

Using the threads_users_username_posts_get_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> threads_users_username_posts_get_with_http_info(username, opts)

begin
  # List Threads posts authored by a user
  data, status_code, headers = api_instance.threads_users_username_posts_get_with_http_info(username, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <ThreadsSearchRecentGet200Response>
rescue Unifapi::ApiError => e
  puts "Error when calling ThreadsApi->threads_users_username_posts_get_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
username String
cursor String [optional]

Return type

ThreadsSearchRecentGet200Response

Authorization

bearerAuth

HTTP request headers

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

threads_users_username_replies_get

threads_users_username_replies_get(username, opts)

List Threads replies authored by a user

Examples

require 'time'
require 'unifapi'
# setup authorization
Unifapi.configure do |config|
  # Configure Bearer authorization: bearerAuth
  config.access_token = 'YOUR_BEARER_TOKEN'
end

api_instance = Unifapi::ThreadsApi.new
username = 'username_example' # String | 
opts = {
  cursor: 'cursor_example' # String | 
}

begin
  # List Threads replies authored by a user
  result = api_instance.threads_users_username_replies_get(username, opts)
  p result
rescue Unifapi::ApiError => e
  puts "Error when calling ThreadsApi->threads_users_username_replies_get: #{e}"
end

Using the threads_users_username_replies_get_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> threads_users_username_replies_get_with_http_info(username, opts)

begin
  # List Threads replies authored by a user
  data, status_code, headers = api_instance.threads_users_username_replies_get_with_http_info(username, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <ThreadsSearchRecentGet200Response>
rescue Unifapi::ApiError => e
  puts "Error when calling ThreadsApi->threads_users_username_replies_get_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
username String
cursor String [optional]

Return type

ThreadsSearchRecentGet200Response

Authorization

bearerAuth

HTTP request headers

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

threads_users_username_reposts_get

threads_users_username_reposts_get(username, opts)

List Threads reposts by a user

Examples

require 'time'
require 'unifapi'
# setup authorization
Unifapi.configure do |config|
  # Configure Bearer authorization: bearerAuth
  config.access_token = 'YOUR_BEARER_TOKEN'
end

api_instance = Unifapi::ThreadsApi.new
username = 'username_example' # String | 
opts = {
  cursor: 'cursor_example' # String | 
}

begin
  # List Threads reposts by a user
  result = api_instance.threads_users_username_reposts_get(username, opts)
  p result
rescue Unifapi::ApiError => e
  puts "Error when calling ThreadsApi->threads_users_username_reposts_get: #{e}"
end

Using the threads_users_username_reposts_get_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> threads_users_username_reposts_get_with_http_info(username, opts)

begin
  # List Threads reposts by a user
  data, status_code, headers = api_instance.threads_users_username_reposts_get_with_http_info(username, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <ThreadsSearchRecentGet200Response>
rescue Unifapi::ApiError => e
  puts "Error when calling ThreadsApi->threads_users_username_reposts_get_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
username String
cursor String [optional]

Return type

ThreadsSearchRecentGet200Response

Authorization

bearerAuth

HTTP request headers

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