All URIs are relative to https://api.opal.dev/v1
Method | HTTP request | Description |
---|---|---|
GetUserTags | Get /users/{user_id}/tags | |
GetUsers | Get /users | |
User | Get /user |
TagsList GetUserTags(ctx, userId).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
userId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the user whose tags to return.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsersApi.GetUserTags(context.Background(), userId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersApi.GetUserTags``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetUserTags`: TagsList
fmt.Fprintf(os.Stdout, "Response from `UsersApi.GetUserTags`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
userId | string | The ID of the user whose tags to return. |
Other parameters are passed through a pointer to a apiGetUserTagsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedUsersList GetUsers(ctx).Cursor(cursor).PageSize(pageSize).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
cursor := "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" // string | The pagination cursor value. (optional)
pageSize := int32(200) // int32 | Number of results to return per page. Default is 200. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsersApi.GetUsers(context.Background()).Cursor(cursor).PageSize(pageSize).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersApi.GetUsers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetUsers`: PaginatedUsersList
fmt.Fprintf(os.Stdout, "Response from `UsersApi.GetUsers`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetUsersRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
cursor | string | The pagination cursor value. | |
pageSize | int32 | Number of results to return per page. Default is 200. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User User(ctx).UserId(userId).Email(email).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
userId := "32acc112-21ff-4669-91c2-21e27683eaa1" // string | The user ID of the user. (optional)
email := "[email protected]" // string | The email of the user. If both user ID and email are provided, user ID will take precedence. If neither are provided, an error will occur. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsersApi.User(context.Background()).UserId(userId).Email(email).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersApi.User``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `User`: User
fmt.Fprintf(os.Stdout, "Response from `UsersApi.User`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiUserRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
userId | string | The user ID of the user. | |
string | The email of the user. If both user ID and email are provided, user ID will take precedence. If neither are provided, an error will occur. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]