shopeeclient

package
v0.0.0-...-44abded Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: AGPL-3.0 Imports: 11 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
}

func NewClient

func NewClient(serverAddr string, localConfigureFilePath string, timeout time.Duration) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) Login

func (c *Client) Login(email, password string) error

func (*Client) LookupItemByIDs

func (c *Client) LookupItemByIDs(itemIds []uint64) ([]ClientItem, error)

func (*Client) LookupItemBySales

func (c *Client) LookupItemBySales(dayCategory shopeetypes.DateCategory, limit int32, categoryId *int32, categoryName *string) ([]ClientItem, error)

func (*Client) Version

func (c *Client) Version() (serverVersion string, isVersionCompatible bool, err error)

type ClientItem

type ClientItem struct {
	ItemId    uint64 `json:"itemId"`
	ShopId    uint64 `json:"shopId"`
	CatId1    uint64 `json:"catId1"`
	CatId2    uint64 `json:"catId2"`
	CatId3    uint64 `json:"catId3"`
	CatName1  string `json:"catName1"`
	CatName2  string `json:"catName2"`
	CatName3  string `json:"catName3"`
	SoldDay1  int64  `json:"s1"`
	SoldDay7  int64  `json:"s7"`
	SoldDay30 int64  `json:"s30"`

	Details ItemDetails `json:"details"`
}

func (ClientItem) ToCSVHeader

func (c ClientItem) ToCSVHeader() []string

func (ClientItem) ToCSVValue

func (c ClientItem) ToCSVValue() []string

type ItemDetails

type ItemDetails struct {
	Snapshots []ItemSoldSnapshot `json:"s"`
}

type ItemSoldSnapshot

type ItemSoldSnapshot struct {
	CrawledTs int64 `json:"cts"`
	Sold      int64 `json:"s"`
}

Jump to

Keyboard shortcuts

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