etsy

package
v0.0.0-...-3c0424e Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

A Client can be used to make requests to the Etsy API, in a way that is compliant with the app.CommerceVendor interface.

func NewClient

func NewClient(apiKey string) *Client

NewClient creates a new etsy.Client given the API key to use.

func NewClientFromEnv

func NewClientFromEnv() (*Client, error)

NewClientFromEnv attempts to initialize an etsy.Client using an API key source from the environment.

func (*Client) GetProductByID

func (c *Client) GetProductByID(
	ctx context.Context,
	productID int,
) (app.CommerceProduct, error)

GetProductByID will fetch an Etsy product by its ID number.

func (*Client) Search

func (c *Client) Search(
	ctx context.Context,
	q app.CommerceQuery,
) ([]app.CommerceProduct, error)

Search will query the Etsy catalog and return matching items.

Jump to

Keyboard shortcuts

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