Skip to content

Latest commit

 

History

History
489 lines (320 loc) · 13.6 KB

File metadata and controls

489 lines (320 loc) · 13.6 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(ctx).Q(q).Execute()

Search Threads users by keyword

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/unifapi-agent/unifapi-sdk-go"
)

func main() {
	q := "q_example" // string | Search keyword.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ThreadsAPI.ThreadsSearchProfilesGet(context.Background()).Q(q).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ThreadsAPI.ThreadsSearchProfilesGet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ThreadsSearchProfilesGet`: ThreadsSearchProfilesGet200Response
	fmt.Fprintf(os.Stdout, "Response from `ThreadsAPI.ThreadsSearchProfilesGet`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiThreadsSearchProfilesGetRequest struct via the builder pattern

Name Type Description Notes
q string Search keyword.

Return type

ThreadsSearchProfilesGet200Response

Authorization

bearerAuth

HTTP request headers

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

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

ThreadsSearchRecentGet

ThreadsSearchRecentGet200Response ThreadsSearchRecentGet(ctx).Q(q).Cursor(cursor).Execute()

Search recent Threads posts

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/unifapi-agent/unifapi-sdk-go"
)

func main() {
	q := "q_example" // string | Search keyword.
	cursor := "cursor_example" // string |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ThreadsAPI.ThreadsSearchRecentGet(context.Background()).Q(q).Cursor(cursor).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ThreadsAPI.ThreadsSearchRecentGet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ThreadsSearchRecentGet`: ThreadsSearchRecentGet200Response
	fmt.Fprintf(os.Stdout, "Response from `ThreadsAPI.ThreadsSearchRecentGet`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiThreadsSearchRecentGetRequest struct via the builder pattern

Name Type Description Notes
q string Search keyword.
cursor string

Return type

ThreadsSearchRecentGet200Response

Authorization

bearerAuth

HTTP request headers

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

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

ThreadsSearchTopGet

ThreadsSearchRecentGet200Response ThreadsSearchTopGet(ctx).Q(q).Cursor(cursor).Execute()

Search top Threads posts

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/unifapi-agent/unifapi-sdk-go"
)

func main() {
	q := "q_example" // string | Search keyword.
	cursor := "cursor_example" // string |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ThreadsAPI.ThreadsSearchTopGet(context.Background()).Q(q).Cursor(cursor).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ThreadsAPI.ThreadsSearchTopGet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ThreadsSearchTopGet`: ThreadsSearchRecentGet200Response
	fmt.Fprintf(os.Stdout, "Response from `ThreadsAPI.ThreadsSearchTopGet`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiThreadsSearchTopGetRequest struct via the builder pattern

Name Type Description Notes
q string Search keyword.
cursor string

Return type

ThreadsSearchRecentGet200Response

Authorization

bearerAuth

HTTP request headers

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

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

ThreadsUsersUsernameGet

ThreadsUsersUsernameGet200Response ThreadsUsersUsernameGet(ctx, username).Execute()

Get a Threads user profile by username

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/unifapi-agent/unifapi-sdk-go"
)

func main() {
	username := "username_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ThreadsAPI.ThreadsUsersUsernameGet(context.Background(), username).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ThreadsAPI.ThreadsUsersUsernameGet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ThreadsUsersUsernameGet`: ThreadsUsersUsernameGet200Response
	fmt.Fprintf(os.Stdout, "Response from `ThreadsAPI.ThreadsUsersUsernameGet`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
username string

Other Parameters

Other parameters are passed through a pointer to a apiThreadsUsersUsernameGetRequest struct via the builder pattern

Name Type Description Notes

Return type

ThreadsUsersUsernameGet200Response

Authorization

bearerAuth

HTTP request headers

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

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

ThreadsUsersUsernamePostsGet

ThreadsSearchRecentGet200Response ThreadsUsersUsernamePostsGet(ctx, username).Cursor(cursor).Execute()

List Threads posts authored by a user

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/unifapi-agent/unifapi-sdk-go"
)

func main() {
	username := "username_example" // string | 
	cursor := "cursor_example" // string |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ThreadsAPI.ThreadsUsersUsernamePostsGet(context.Background(), username).Cursor(cursor).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ThreadsAPI.ThreadsUsersUsernamePostsGet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ThreadsUsersUsernamePostsGet`: ThreadsSearchRecentGet200Response
	fmt.Fprintf(os.Stdout, "Response from `ThreadsAPI.ThreadsUsersUsernamePostsGet`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
username string

Other Parameters

Other parameters are passed through a pointer to a apiThreadsUsersUsernamePostsGetRequest struct via the builder pattern

Name Type Description Notes

cursor | string | |

Return type

ThreadsSearchRecentGet200Response

Authorization

bearerAuth

HTTP request headers

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

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

ThreadsUsersUsernameRepliesGet

ThreadsSearchRecentGet200Response ThreadsUsersUsernameRepliesGet(ctx, username).Cursor(cursor).Execute()

List Threads replies authored by a user

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/unifapi-agent/unifapi-sdk-go"
)

func main() {
	username := "username_example" // string | 
	cursor := "cursor_example" // string |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ThreadsAPI.ThreadsUsersUsernameRepliesGet(context.Background(), username).Cursor(cursor).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ThreadsAPI.ThreadsUsersUsernameRepliesGet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ThreadsUsersUsernameRepliesGet`: ThreadsSearchRecentGet200Response
	fmt.Fprintf(os.Stdout, "Response from `ThreadsAPI.ThreadsUsersUsernameRepliesGet`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
username string

Other Parameters

Other parameters are passed through a pointer to a apiThreadsUsersUsernameRepliesGetRequest struct via the builder pattern

Name Type Description Notes

cursor | string | |

Return type

ThreadsSearchRecentGet200Response

Authorization

bearerAuth

HTTP request headers

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

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

ThreadsUsersUsernameRepostsGet

ThreadsSearchRecentGet200Response ThreadsUsersUsernameRepostsGet(ctx, username).Cursor(cursor).Execute()

List Threads reposts by a user

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/unifapi-agent/unifapi-sdk-go"
)

func main() {
	username := "username_example" // string | 
	cursor := "cursor_example" // string |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ThreadsAPI.ThreadsUsersUsernameRepostsGet(context.Background(), username).Cursor(cursor).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ThreadsAPI.ThreadsUsersUsernameRepostsGet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ThreadsUsersUsernameRepostsGet`: ThreadsSearchRecentGet200Response
	fmt.Fprintf(os.Stdout, "Response from `ThreadsAPI.ThreadsUsersUsernameRepostsGet`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
username string

Other Parameters

Other parameters are passed through a pointer to a apiThreadsUsersUsernameRepostsGetRequest struct via the builder pattern

Name Type Description Notes

cursor | string | |

Return type

ThreadsSearchRecentGet200Response

Authorization

bearerAuth

HTTP request headers

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

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