Documentation
¶
Index ¶
- Constants
- type AccessTokenResponse
- type Client
- func (c *Client) DeleteListingsItem(ctx context.Context, sellerID, sku string) (*types.DeleteListingsItemResponse, error)
- func (c *Client) GetCatalogItem(ctx context.Context, asin string) (*types.GetCatalogItemResponse, error)
- func (c *Client) GetListingsItem(ctx context.Context, sellerID, sku string) (*types.GetListingsItemResponse, error)
- func (c *Client) GetMarketplaceParticipations(ctx context.Context) (*types.GetMarketplaceParticipationsResponse, error)
- func (c *Client) ListCatalogItem(ctx context.Context, query string) (*types.ListCatalogItemResponse, error)
- func (c *Client) PatchListingsItem(ctx context.Context, sellerID, sku string, body map[string]interface{}) (*types.PatchListingsItemResponse, error)
- func (c *Client) PutListingsItem(ctx context.Context, sellerID, sku string, body map[string]interface{}) (*types.PutListingsItemResponse, error)
- type Config
Constants ¶
View Source
const ( ContentType = "application/json" ServiceName = "execute-api" APIEndpointAuthToken = "https://api.amazon.com/auth/o2/token" APIEndpointGetCatalogItem = "https://%s/catalog/v0/items/%s" APIEndpointListCatalogItem = "https://%s/catalog/v0/items" APIEndpointGetMarketplaceParticipations = "https://%s/sellers/v1/marketplaceParticipations" APIEndpointListingsItem = "https://%s/listings/2021-08-01/items/%s/%s" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessTokenResponse ¶
type AccessTokenResponse struct { AccessToken string `json:"access_token"` ExpiresIn int `json:"expires_in"` }
func GetAccessToken ¶
func GetAccessToken(c *Config) (*AccessTokenResponse, error)
type Client ¶
type Client struct { Config *Config Credentials *credentials.Credentials AccessToken string AccessTokenExpire time.Time }
func (*Client) DeleteListingsItem ¶
func (*Client) GetCatalogItem ¶
func (*Client) GetListingsItem ¶
func (*Client) GetMarketplaceParticipations ¶
func (*Client) ListCatalogItem ¶
func (*Client) PatchListingsItem ¶
func (*Client) PutListingsItem ¶
type Config ¶
type Config struct { ClientID string ClientSecret string RefreshToken string AccessKey string SecretKey string Endpoint string // see https://developer-docs.amazon.com/amazon-shipping/docs/sp-api-endpoints MarketplaceID string // see https://developer-docs.amazon.com/sp-api/docs/marketplace-ids Region string // see https://developer-docs.amazon.com/amazon-shipping/docs/sp-api-endpoints }
Click to show internal directories.
Click to hide internal directories.