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.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user