temp
This commit is contained in:
@@ -2,13 +2,15 @@ package ozon
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"git.denco.store/fakz9/ozon-api-client/ozon"
|
||||
"github.com/tidwall/gjson"
|
||||
"net/http"
|
||||
"sipro-mps/internal/marketplace"
|
||||
|
||||
"git.denco.store/fakz9/ozon-api-client/ozon"
|
||||
"github.com/redis/rueidis"
|
||||
"github.com/tidwall/gjson"
|
||||
)
|
||||
|
||||
func GetClientFromMarketplace(mp *marketplace.Marketplace) (*ozon.Client, error) {
|
||||
func GetClientFromMarketplace(redis rueidis.Client, mp *marketplace.Marketplace) (*ozon.Client, error) {
|
||||
|
||||
authDataParsed := gjson.Parse(mp.AuthData)
|
||||
clientIdResult := authDataParsed.Get("clientId")
|
||||
@@ -19,7 +21,7 @@ func GetClientFromMarketplace(mp *marketplace.Marketplace) (*ozon.Client, error)
|
||||
apiKey := apiKeyResult.String()
|
||||
clientId := clientIdResult.String()
|
||||
httpClient := &http.Client{
|
||||
Transport: NewRateLimitTransport(),
|
||||
Transport: NewRateLimitTransport(redis),
|
||||
}
|
||||
opts := []ozon.ClientOption{
|
||||
ozon.WithAPIKey(apiKey),
|
||||
|
||||
Reference in New Issue
Block a user