spapi

package
v0.0.0-...-fda2037 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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 NewClient

func NewClient(c *Config) (*Client, error)

func (*Client) DeleteListingsItem

func (c *Client) DeleteListingsItem(ctx context.Context, sellerID, sku string) (*types.DeleteListingsItemResponse, error)

func (*Client) GetCatalogItem

func (c *Client) GetCatalogItem(ctx context.Context, asin string) (*types.GetCatalogItemResponse, error)

func (*Client) GetListingsItem

func (c *Client) GetListingsItem(ctx context.Context, sellerID, sku string) (*types.GetListingsItemResponse, error)

func (*Client) GetMarketplaceParticipations

func (c *Client) GetMarketplaceParticipations(ctx context.Context) (*types.GetMarketplaceParticipationsResponse, error)

func (*Client) ListCatalogItem

func (c *Client) ListCatalogItem(ctx context.Context, query string) (*types.ListCatalogItemResponse, error)

func (*Client) PatchListingsItem

func (c *Client) PatchListingsItem(ctx context.Context, sellerID, sku string, body map[string]interface{}) (*types.PatchListingsItemResponse, error)

func (*Client) PutListingsItem

func (c *Client) PutListingsItem(ctx context.Context, sellerID, sku string, body map[string]interface{}) (*types.PutListingsItemResponse, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL