Documentation ¶
Index ¶
- Constants
- func APIKey(apiKey string) func(r *APIClient)
- func APIUrl(apiURL string) func(r *APIClient)
- func APIVersion(version APIVersionNumber) func(r *APIClient)
- func AdditionalHeaders(headers map[string]string) func(r *APIClient)
- func Retries(retries int) func(r *APIClient)
- func Timeout(timeout time.Duration) func(r *APIClient)
- type APIClient
- type APIVersionNumber
Constants ¶
View Source
const ( // V1 is Decision API V1 V1 = iota + 1 // V2 is Decision API V2 V2 )
Variables ¶
This section is empty.
Functions ¶
func APIVersion ¶
func APIVersion(version APIVersionNumber) func(r *APIClient)
APIVersion sets http client base URL
func AdditionalHeaders ¶ added in v2.0.13
Retries sets max number of retries for failed calls
Types ¶
type APIClient ¶
type APIClient struct {
// contains filtered or unexported fields
}
APIClient represents the Decision API client informations
func NewAPIClient ¶
NewAPIClient creates a Decision API client from the environment ID and option builders
func (*APIClient) ActivateCampaign ¶
func (r *APIClient) ActivateCampaign(request model.ActivationHit) error
ActivateCampaign activate a campaign / variation id to the Decision API
func (*APIClient) GetModifications ¶
func (r *APIClient) GetModifications(visitorID string, anonymousID *string, context model.Context) (*model.APIClientResponse, error)
GetModifications gets modifications from Decision API
type APIVersionNumber ¶
type APIVersionNumber int
APIVersionNumber specifies the version of the Decision API to use
Click to show internal directories.
Click to hide internal directories.