personalization

package
v3.31.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides methods to interact with the Algolia Personalization API.

func NewClient

func NewClient(appID, apiKey string, region region.Region) *Client

NewClient instantiates a new client able to interact with the Algolia Personalization API.

func NewClientWithConfig

func NewClientWithConfig(config Configuration) *Client

NewClientWithConfig instantiates a new client able to interact with the Personalization API.

func (*Client) GetPersonalizationStrategy

func (c *Client) GetPersonalizationStrategy(opts ...interface{}) (strategy Strategy, err error)

func (*Client) SetPersonalizationStrategy

func (c *Client) SetPersonalizationStrategy(strategy Strategy, opts ...interface{}) (res SetPersonalizationStrategyRes, err error)

type Configuration

type Configuration struct {
	AppID          string
	APIKey         string
	Hosts          []string
	Requester      transport.Requester
	ReadTimeout    time.Duration
	WriteTimeout   time.Duration
	Region         region.Region
	Headers        map[string]string
	ExtraUserAgent string
}

type EventsScoring

type EventsScoring struct {
	EventName string `json:"eventName"`
	EventType string `json:"eventType"`
	Score     int    `json:"score"`
}

type FacetsScoring

type FacetsScoring struct {
	FacetName string `json:"facetName"`
	Score     int    `json:"score"`
}

type SetPersonalizationStrategyRes

type SetPersonalizationStrategyRes struct {
	Status  int    `json:"status"`
	Message string `json:"message"`
}

type Strategy

type Strategy struct {
	EventsScoring         []EventsScoring                  `json:"eventsScoring"`
	FacetsScoring         []FacetsScoring                  `json:"facetsScoring"`
	PersonalizationImpact *opt.PersonalizationImpactOption `json:"personalizationImpact"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL