Skip to content

Latest commit

 

History

History
536 lines (427 loc) · 17.8 KB

File metadata and controls

536 lines (427 loc) · 17.8 KB

ThreadsApi

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

Method HTTP request Description
threadsSearchProfilesGet GET /threads/search/profiles Search Threads users by keyword
threadsSearchRecentGet GET /threads/search/recent Search recent Threads posts
threadsSearchTopGet GET /threads/search/top Search top Threads posts
threadsUsersUsernameGet GET /threads/users/{username} Get a Threads user profile by username
threadsUsersUsernamePostsGet GET /threads/users/{username}/posts List Threads posts authored by a user
threadsUsersUsernameRepliesGet GET /threads/users/{username}/replies List Threads replies authored by a user
threadsUsersUsernameRepostsGet GET /threads/users/{username}/reposts List Threads reposts by a user

threadsSearchProfilesGet

ThreadsSearchProfilesGet200Response threadsSearchProfilesGet(q)

Search Threads users by keyword

Example

// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.ThreadsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.unifapi.com");
    
    // Configure HTTP bearer authorization: bearerAuth
    HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
    bearerAuth.setBearerToken("BEARER TOKEN");

    ThreadsApi apiInstance = new ThreadsApi(defaultClient);
    String q = "q_example"; // String | Search keyword.
    try {
      ThreadsSearchProfilesGet200Response result = apiInstance.threadsSearchProfilesGet(q);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ThreadsApi#threadsSearchProfilesGet");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
q String Search keyword.

Return type

ThreadsSearchProfilesGet200Response

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
400 Validation or invalid-id error -
401 Missing, invalid, disabled, revoked, or expired UnifAPI API key -
402 Insufficient workspace credits -
404 Resource not found -
429 Rate limited -
500 Internal error -
502 Source error -
503 Source unavailable -

threadsSearchRecentGet

ThreadsSearchRecentGet200Response threadsSearchRecentGet(q, cursor)

Search recent Threads posts

Example

// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.ThreadsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.unifapi.com");
    
    // Configure HTTP bearer authorization: bearerAuth
    HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
    bearerAuth.setBearerToken("BEARER TOKEN");

    ThreadsApi apiInstance = new ThreadsApi(defaultClient);
    String q = "q_example"; // String | Search keyword.
    String cursor = "cursor_example"; // String | 
    try {
      ThreadsSearchRecentGet200Response result = apiInstance.threadsSearchRecentGet(q, cursor);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ThreadsApi#threadsSearchRecentGet");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

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

HTTP response details

Status code Description Response headers
200 OK -
400 Validation or invalid-id error -
401 Missing, invalid, disabled, revoked, or expired UnifAPI API key -
402 Insufficient workspace credits -
404 Resource not found -
429 Rate limited -
500 Internal error -
502 Source error -
503 Source unavailable -

threadsSearchTopGet

ThreadsSearchRecentGet200Response threadsSearchTopGet(q, cursor)

Search top Threads posts

Example

// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.ThreadsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.unifapi.com");
    
    // Configure HTTP bearer authorization: bearerAuth
    HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
    bearerAuth.setBearerToken("BEARER TOKEN");

    ThreadsApi apiInstance = new ThreadsApi(defaultClient);
    String q = "q_example"; // String | Search keyword.
    String cursor = "cursor_example"; // String | 
    try {
      ThreadsSearchRecentGet200Response result = apiInstance.threadsSearchTopGet(q, cursor);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ThreadsApi#threadsSearchTopGet");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

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

HTTP response details

Status code Description Response headers
200 OK -
400 Validation or invalid-id error -
401 Missing, invalid, disabled, revoked, or expired UnifAPI API key -
402 Insufficient workspace credits -
404 Resource not found -
429 Rate limited -
500 Internal error -
502 Source error -
503 Source unavailable -

threadsUsersUsernameGet

ThreadsUsersUsernameGet200Response threadsUsersUsernameGet(username)

Get a Threads user profile by username

Example

// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.ThreadsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.unifapi.com");
    
    // Configure HTTP bearer authorization: bearerAuth
    HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
    bearerAuth.setBearerToken("BEARER TOKEN");

    ThreadsApi apiInstance = new ThreadsApi(defaultClient);
    String username = "username_example"; // String | 
    try {
      ThreadsUsersUsernameGet200Response result = apiInstance.threadsUsersUsernameGet(username);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ThreadsApi#threadsUsersUsernameGet");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
username String

Return type

ThreadsUsersUsernameGet200Response

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
400 Validation or invalid-id error -
401 Missing, invalid, disabled, revoked, or expired UnifAPI API key -
402 Insufficient workspace credits -
404 Resource not found -
429 Rate limited -
500 Internal error -
502 Source error -
503 Source unavailable -

threadsUsersUsernamePostsGet

ThreadsSearchRecentGet200Response threadsUsersUsernamePostsGet(username, cursor)

List Threads posts authored by a user

Example

// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.ThreadsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.unifapi.com");
    
    // Configure HTTP bearer authorization: bearerAuth
    HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
    bearerAuth.setBearerToken("BEARER TOKEN");

    ThreadsApi apiInstance = new ThreadsApi(defaultClient);
    String username = "username_example"; // String | 
    String cursor = "cursor_example"; // String | 
    try {
      ThreadsSearchRecentGet200Response result = apiInstance.threadsUsersUsernamePostsGet(username, cursor);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ThreadsApi#threadsUsersUsernamePostsGet");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

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

HTTP response details

Status code Description Response headers
200 OK -
400 Validation or invalid-id error -
401 Missing, invalid, disabled, revoked, or expired UnifAPI API key -
402 Insufficient workspace credits -
404 Resource not found -
429 Rate limited -
500 Internal error -
502 Source error -
503 Source unavailable -

threadsUsersUsernameRepliesGet

ThreadsSearchRecentGet200Response threadsUsersUsernameRepliesGet(username, cursor)

List Threads replies authored by a user

Example

// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.ThreadsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.unifapi.com");
    
    // Configure HTTP bearer authorization: bearerAuth
    HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
    bearerAuth.setBearerToken("BEARER TOKEN");

    ThreadsApi apiInstance = new ThreadsApi(defaultClient);
    String username = "username_example"; // String | 
    String cursor = "cursor_example"; // String | 
    try {
      ThreadsSearchRecentGet200Response result = apiInstance.threadsUsersUsernameRepliesGet(username, cursor);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ThreadsApi#threadsUsersUsernameRepliesGet");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

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

HTTP response details

Status code Description Response headers
200 OK -
400 Validation or invalid-id error -
401 Missing, invalid, disabled, revoked, or expired UnifAPI API key -
402 Insufficient workspace credits -
404 Resource not found -
429 Rate limited -
500 Internal error -
502 Source error -
503 Source unavailable -

threadsUsersUsernameRepostsGet

ThreadsSearchRecentGet200Response threadsUsersUsernameRepostsGet(username, cursor)

List Threads reposts by a user

Example

// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.ThreadsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.unifapi.com");
    
    // Configure HTTP bearer authorization: bearerAuth
    HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
    bearerAuth.setBearerToken("BEARER TOKEN");

    ThreadsApi apiInstance = new ThreadsApi(defaultClient);
    String username = "username_example"; // String | 
    String cursor = "cursor_example"; // String | 
    try {
      ThreadsSearchRecentGet200Response result = apiInstance.threadsUsersUsernameRepostsGet(username, cursor);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ThreadsApi#threadsUsersUsernameRepostsGet");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

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

HTTP response details

Status code Description Response headers
200 OK -
400 Validation or invalid-id error -
401 Missing, invalid, disabled, revoked, or expired UnifAPI API key -
402 Insufficient workspace credits -
404 Resource not found -
429 Rate limited -
500 Internal error -
502 Source error -
503 Source unavailable -