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:
2026-04-15 23:45:49 +02:00
commit 25410749db
27 changed files with 3481 additions and 0 deletions
+23
View File
@@ -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
}