This commit is contained in:
diPhantxm
2023-03-12 22:37:40 +03:00
commit ca40ab4559
10 changed files with 1152 additions and 0 deletions

30
ozon/ozon.go Normal file
View File

@@ -0,0 +1,30 @@
package ozon
import (
"net/http"
core "github.com/diphantxm/ozon-api-client"
)
const (
DefaultAPIBaseUrl = "https://api-seller.ozon.ru"
)
type Client struct {
client *core.Client
}
func NewClient(clientId, apiKey string) *Client {
return &Client{
client: core.NewClient(DefaultAPIBaseUrl, map[string]string{
"Client-Id": clientId,
"Api-Key": apiKey,
}),
}
}
func NewMockClient(handler http.HandlerFunc) *Client {
return &Client{
client: core.NewMockClient(handler),
}
}