| 13 | } |
| 14 | |
| 15 | func (c *PersonalizationClient) decode(resp []byte, err error) (*PersonalizationResponse, error) { |
| 16 | if err != nil { |
| 17 | return nil, err |
| 18 | } |
| 19 | var result PersonalizationResponse |
| 20 | if err := json.Unmarshal(resp, &result); err != nil { |
| 21 | return nil, fmt.Errorf("cannot unmarshal resp: %w", err) |
| 22 | } |
| 23 | return &result, nil |
| 24 | } |
| 25 | |
| 26 | // Get obtains a PersonalizationResponse for the given resource and params. |
| 27 | func (c *PersonalizationClient) Get(ctx context.Context, resource string, params map[string]any) (*PersonalizationResponse, error) { |