All URIs are relative to https://universal-api.taplytics.com/v1
| Method | HTTP request | Description |
|---|---|---|
| VariationGet | Get /variation | Get Variation for a Taplytics Experiment |
| VariationPost | Post /variation | Get Variation for a Taplytics Experiment |
VariationGet(ctx).Token(token).UserId(userId).ExperimentName(experimentName).Attributes(attributes).CustomData(customData).Execute()
Get Variation for a Taplytics Experiment
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
token := "token_example" // string | SDK token for the project
userId := "userId_example" // string | ID for current user
experimentName := "experimentName_example" // string | Name of an Experiment
attributes := *openapiclient.NewUserAttributes() // UserAttributes | serialized attributes object
customData := TODO // map[string]interface{} | serialized custom data object
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.VariationsApi.VariationGet(context.Background()).Token(token).UserId(userId).ExperimentName(experimentName).Attributes(attributes).CustomData(customData).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VariationsApi.VariationGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}Other parameters are passed through a pointer to a apiVariationGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| token | string | SDK token for the project | |
| userId | string | ID for current user | |
| experimentName | string | Name of an Experiment | |
| attributes | UserAttributes | serialized attributes object | |
| customData | map[string]interface{} | serialized custom data object |
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: text/plain
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VariationPost(ctx).Token(token).UserId(userId).ExperimentName(experimentName).UserAttributesWithCustomData(userAttributesWithCustomData).Execute()
Get Variation for a Taplytics Experiment
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
token := "token_example" // string | SDK token for the project
userId := "userId_example" // string | ID for current user
experimentName := "experimentName_example" // string | Name of an Experiment
userAttributesWithCustomData := *openapiclient.NewUserAttributesWithCustomData() // UserAttributesWithCustomData | All user attributes and optional custom data (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.VariationsApi.VariationPost(context.Background()).Token(token).UserId(userId).ExperimentName(experimentName).UserAttributesWithCustomData(userAttributesWithCustomData).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VariationsApi.VariationPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}Other parameters are passed through a pointer to a apiVariationPostRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| token | string | SDK token for the project | |
| userId | string | ID for current user | |
| experimentName | string | Name of an Experiment | |
| userAttributesWithCustomData | UserAttributesWithCustomData | All user attributes and optional custom data |
(empty response body)
No authorization required
- Content-Type: application/jason
- Accept: text/plain
[Back to top] [Back to API list] [Back to Model list] [Back to README]