Files
mrktplaats/config.go
T
Joren 25410749db Initial Marktplaats SDK scaffold
Clone the twdehands SDK into mrktplaats and retarget naming and defaults for app.marktplaats.nl while keeping the same request/response bodies and endpoint behavior.
2026-04-15 23:45:49 +02:00

24 lines
619 B
Go

package mrktplaats
import "context"
// ConfigService handles A/B tests and feature flags.
type ConfigService struct {
t *transport
}
// LabsConfig contains A/B test assignments and feature flags.
type LabsConfig struct {
ABSwitches map[string]string `json:"abSwitches"`
FeatureSwitches map[string]bool `json:"featureSwitches"`
}
// Labs returns the current A/B test and feature flag configuration.
func (s *ConfigService) Labs(ctx context.Context) (*LabsConfig, error) {
var resp LabsConfig
if err := s.t.get(ctx, "/app/v1/labs/config", nil, &resp); err != nil {
return nil, err
}
return &resp, nil
}