auction

package
v0.0.0-...-9b137ae Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 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 ChiChildCategory

type ChiChildCategory struct {
	ChiCategoryId       int    `xml:"urn:yahoo:jp:auc:categoryTree CategoryId,omitempty"`
	ChiCategoryIdPath   string `xml:"urn:yahoo:jp:auc:categoryTree CategoryIdPath,omitempty"`
	ChiCategoryName     string `xml:"urn:yahoo:jp:auc:categoryTree CategoryName,omitempty"`
	ChiCategoryPath     string `xml:"urn:yahoo:jp:auc:categoryTree CategoryPath,omitempty"`
	ChiDepth            int    `xml:"urn:yahoo:jp:auc:categoryTree Depth,omitempty"`
	ChiIsAdult          bool   `xml:"urn:yahoo:jp:auc:categoryTree IsAdult,omitempty"`
	ChiIsLeaf           bool   `xml:"urn:yahoo:jp:auc:categoryTree IsLeaf,omitempty"`
	ChiIsLeafToLink     bool   `xml:"urn:yahoo:jp:auc:categoryTree IsLeafToLink,omitempty"`
	ChiIsLink           bool   `xml:"urn:yahoo:jp:auc:categoryTree IsLink,omitempty"`
	ChiNumOfAuctions    int    `xml:"urn:yahoo:jp:auc:categoryTree NumOfAuctions,omitempty"`
	ChiOrder            int    `xml:"urn:yahoo:jp:auc:categoryTree Order,omitempty"`
	ChiParentCategoryId int    `xml:"urn:yahoo:jp:auc:categoryTree ParentCategoryId,omitempty"`
}

type ChiImage

type ChiImage struct {
	Attr_height string `xml:" height,attr"`
	Attr_width  string `xml:" width,attr"`
	Text        string `xml:",chardata"`
}

type ChiItem

type ChiItem struct {
	ChiAuctionID      string                `xml:"urn:yahoo:jp:auc:categoryLeaf AuctionID,omitempty"`
	ChiAuctionItemUrl string                `xml:"urn:yahoo:jp:auc:categoryLeaf AuctionItemUrl,omitempty"`
	ChiBidOrBuy       float64               `xml:"urn:yahoo:jp:auc:categoryLeaf BidOrBuy,omitempty"`
	ChiBids           int                   `xml:"urn:yahoo:jp:auc:categoryLeaf Bids,omitempty"`
	ChiCharityOption  *ChiItemCharityOption `xml:"urn:yahoo:jp:auc:categoryLeaf CharityOption,omitempty"`
	ChiCurrentPrice   float64               `xml:"urn:yahoo:jp:auc:categoryLeaf CurrentPrice,omitempty"`
	ChiEndTime        time.Time             `xml:"urn:yahoo:jp:auc:categoryLeaf EndTime,omitempty"`
	ChiItemImage      *ChiItemImage         `xml:"urn:yahoo:jp:auc:categoryLeaf Image,omitempty"`
	ChiIsAdult        bool                  `xml:"urn:yahoo:jp:auc:categoryLeaf IsAdult,omitempty"`
	ChiIsReserved     bool                  `xml:"urn:yahoo:jp:auc:categoryLeaf IsReserved,omitempty"`
	ChiItemUrl        string                `xml:"urn:yahoo:jp:auc:categoryLeaf ItemUrl,omitempty"`
	ChiItemOption     *ChiItemOption        `xml:"urn:yahoo:jp:auc:categoryLeaf Option,omitempty"`
	ChiItemSeller     *ChiItemSeller        `xml:"urn:yahoo:jp:auc:categoryLeaf Seller,omitempty"`
	ChiTitle          string                `xml:"urn:yahoo:jp:auc:categoryLeaf Title,omitempty"`
}

type ChiItemCharityOption

type ChiItemCharityOption struct {
	ChiProportion int `xml:"urn:yahoo:jp:auc:categoryLeaf Proportion,omitempty"`
}

type ChiItemImage

type ChiItemImage struct {
	Attr_height string `xml:" height,attr"`
	Attr_width  string `xml:" width,attr"`
	Text        string `xml:",chardata"`
}

type ChiItemOption

type ChiItemOption struct {
	ChiBuynowIcon        string `xml:"urn:yahoo:jp:auc:categoryLeaf BuynowIcon,omitempty"`
	ChiEasyPaymentIcon   string `xml:"urn:yahoo:jp:auc:categoryLeaf EasyPaymentIcon,omitempty"`
	ChiIsBackGroundColor bool   `xml:"urn:yahoo:jp:auc:categoryLeaf IsBackGroundColor,omitempty"`
	ChiIsBold            bool   `xml:"urn:yahoo:jp:auc:categoryLeaf IsBold,omitempty"`
	ChiIsCharity         bool   `xml:"urn:yahoo:jp:auc:categoryLeaf IsCharity,omitempty"`
	ChiIsOffer           bool   `xml:"urn:yahoo:jp:auc:categoryLeaf IsOffer,omitempty"`
	ChiNewIcon           string `xml:"urn:yahoo:jp:auc:categoryLeaf NewIcon,omitempty"`
	ChiNewItemIcon       string `xml:"urn:yahoo:jp:auc:categoryLeaf NewItemIcon,omitempty"`
	ChiStarClubIcon      string `xml:"urn:yahoo:jp:auc:categoryLeaf StarClubIcon,omitempty"`
}

type ChiItemResult

type ChiItemResult struct {
	ChiCategoryPath string     `xml:"urn:yahoo:jp:auc:categoryLeaf CategoryPath,omitempty"`
	ChiItem         []*ChiItem `xml:"urn:yahoo:jp:auc:categoryLeaf Item,omitempty"`
}

type ChiItemResultSet

type ChiItemResultSet struct {
	Attr_firstResultPosition   string         `xml:"firstResultPosition,attr" `
	Attr_xsi_schemaLocation    string         `xml:"http://www.w3.org/2001/XMLSchema-instance schemaLocation,attr"`
	Attr_totalResultsAvailable string         `xml:"totalResultsAvailable,attr"`
	Attr_totalResultsReturned  string         `xml:"totalResultsReturned,attr"`
	Attr_xmlns                 string         `xml:"xmlns,attr"`
	Attr_xsi                   string         `xml:"xmlns xsi,attr"`
	ChiItemResult              *ChiItemResult `xml:"urn:yahoo:jp:auc:categoryLeaf Result,omitempty"`
}

type ChiItemSeller

type ChiItemSeller struct {
	ChiItemSellerId  string `xml:"urn:yahoo:jp:auc:categoryLeaf Id,omitempty"`
	ChiItemListUrl   string `xml:"urn:yahoo:jp:auc:categoryLeaf ItemListUrl,omitempty"`
	ChiItemRatingUrl string `xml:"urn:yahoo:jp:auc:categoryLeaf RatingUrl,omitempty"`
}

type ChiItemroot

type ChiItemroot struct {
	ChiItemResultSet *ChiItemResultSet `xml:"urn:yahoo:jp:auc:categoryLeaf ResultSet,omitempty"`
}

type ChiResult

type ChiResult struct {
	ChiCategoryId       int                 `xml:"urn:yahoo:jp:auc:categoryTree CategoryId,omitempty"`
	ChiCategoryIdPath   string              `xml:"urn:yahoo:jp:auc:categoryTree CategoryIdPath,omitempty"`
	ChiCategoryName     string              `xml:"urn:yahoo:jp:auc:categoryTree CategoryName,omitempty"`
	ChiCategoryPath     string              `xml:"urn:yahoo:jp:auc:categoryTree CategoryPath,omitempty"`
	ChiChildCategory    []*ChiChildCategory `xml:"urn:yahoo:jp:auc:categoryTree ChildCategory,omitempty"`
	ChiChildCategoryNum int                 `xml:"urn:yahoo:jp:auc:categoryTree ChildCategoryNum,omitempty"`
	ChiDepth            int                 `xml:"urn:yahoo:jp:auc:categoryTree Depth,omitempty"`
	ChiIsAdult          bool                `xml:"urn:yahoo:jp:auc:categoryTree IsAdult,omitempty"`
	ChiIsLeaf           bool                `xml:"urn:yahoo:jp:auc:categoryTree IsLeaf,omitempty"`
	ChiIsLeafToLink     bool                `xml:"urn:yahoo:jp:auc:categoryTree IsLeafToLink,omitempty"`
	ChiIsLink           bool                `xml:"urn:yahoo:jp:auc:categoryTree IsLink,omitempty"`
	ChiOrder            int                 `xml:"urn:yahoo:jp:auc:categoryTree Order,omitempty"`
}

type ChiResultSet

type ChiResultSet struct {
	Attr_firstResultPosition   string     `xml:"firstResultPosition,attr"`
	Attr_xsi_schemaLocation    string     `xml:"http://www.w3.org/2001/XMLSchema-instance schemaLocation,attr"`
	Attr_totalResultsAvailable string     `xml:"totalResultsAvailable,attr"`
	Attr_totalResultsReturned  string     `xml:"totalResultsReturned,attr"`
	Attr_xmlns                 string     `xml:"xmlns,attr"`
	Attr_xsi                   string     `xml:"xmlns xsi,attr"`
	ChiResult                  *ChiResult `xml:"urn:yahoo:jp:auc:categoryTree Result,omitempty"`
}

type ChiSearchCharityOption

type ChiSearchCharityOption struct {
	ChiProportion int `xml:"urn:yahoo:jp:auc:search Proportion,omitempty"`
}

type ChiSearchImage

type ChiSearchImage struct {
	Attr_height string `xml:" height,attr"`
	Attr_width  string `xml:" width,attr"`
	Text        string `xml:",chardata"`
}

type ChiSearchItem

type ChiSearchItem struct {
	ChiAuctionID        string                  `xml:"urn:yahoo:jp:auc:search AuctionID,omitempty"`
	ChiAuctionItemUrl   string                  `xml:"urn:yahoo:jp:auc:search AuctionItemUrl,omitempty"`
	ChiBidOrBuy         float64                 `xml:"urn:yahoo:jp:auc:search BidOrBuy,omitempty"`
	ChiBids             int                     `xml:"urn:yahoo:jp:auc:search Bids,omitempty"`
	ChiCategoryId       int                     `xml:"urn:yahoo:jp:auc:search CategoryId,omitempty"`
	ChiCharityOption    *ChiSearchCharityOption `xml:"urn:yahoo:jp:auc:search CharityOption,omitempty"`
	ChiCurrentPrice     float64                 `xml:"urn:yahoo:jp:auc:search CurrentPrice,omitempty"`
	ChiEndTime          time.Time               `xml:"urn:yahoo:jp:auc:search EndTime,omitempty"`
	ChiImage            *ChiSearchImage         `xml:"urn:yahoo:jp:auc:search Image,omitempty"`
	ChiIsAdult          bool                    `xml:"urn:yahoo:jp:auc:search IsAdult,omitempty"`
	ChiIsReserved       bool                    `xml:"urn:yahoo:jp:auc:search IsReserved,omitempty"`
	ChiItemUrl          string                  `xml:"urn:yahoo:jp:auc:search ItemUrl,omitempty"`
	ChiOption           *ChiSearchOption        `xml:"urn:yahoo:jp:auc:search Option,omitempty"`
	ChiOriginalImageNum int                     `xml:"urn:yahoo:jp:auc:search OriginalImageNum,omitempty"`
	ChiSeller           *ChiSearchSeller        `xml:"urn:yahoo:jp:auc:search Seller,omitempty"`
	ChiTitle            string                  `xml:"urn:yahoo:jp:auc:search Title,omitempty"`
}

type ChiSearchOption

type ChiSearchOption struct {
	ChiBuynowIcon        string `xml:"urn:yahoo:jp:auc:search BuynowIcon,omitempty"`
	ChiEasyPaymentIcon   string `xml:"urn:yahoo:jp:auc:search EasyPaymentIcon,omitempty"`
	ChiIsBackGroundColor bool   `xml:"urn:yahoo:jp:auc:search IsBackGroundColor,omitempty"`
	ChiIsBold            bool   `xml:"urn:yahoo:jp:auc:search IsBold,omitempty"`
	ChiIsCharity         bool   `xml:"urn:yahoo:jp:auc:search IsCharity,omitempty"`
	ChiIsOffer           bool   `xml:"urn:yahoo:jp:auc:search IsOffer,omitempty"`
	ChiNewIcon           string `xml:"urn:yahoo:jp:auc:search NewIcon,omitempty"`
	ChiNewItemIcon       string `xml:"urn:yahoo:jp:auc:search NewItemIcon,omitempty"`
	ChiStoreIcon         string `xml:"urn:yahoo:jp:auc:search StoreIcon,omitempty"`
}

type ChiSearchResult

type ChiSearchResult struct {
	ChiItem      []*ChiSearchItem `xml:"urn:yahoo:jp:auc:search Item,omitempty"`
	ChiUnitsWord string           `xml:"urn:yahoo:jp:auc:search UnitsWord,omitempty"`
}

type ChiSearchResultSet

type ChiSearchResultSet struct {
	Attr_firstResultPosition   string           `xml:" firstResultPosition,attr"`
	Attr_xsi_schemaLocation    string           `xml:"http://www.w3.org/2001/XMLSchema-instance schemaLocation,attr"`
	Attr_totalResultsAvailable string           `xml:" totalResultsAvailable,attr"`
	Attr_totalResultsReturned  string           `xml:" totalResultsReturned,attr"`
	Attr_xmlns                 string           `xml:" xmlns,attr"`
	Attr_xsi                   string           `xml:"xmlns xsi,attr"`
	ChiSearchResult            *ChiSearchResult `xml:"urn:yahoo:jp:auc:search Result,omitempty"`
}

type ChiSearchSeller

type ChiSearchSeller struct {
	ChiItemSellerId  string `xml:"urn:yahoo:jp:auc:search Id,omitempty"`
	ChiItemListUrl   string `xml:"urn:yahoo:jp:auc:search ItemListUrl,omitempty"`
	ChiItemRatingUrl string `xml:"urn:yahoo:jp:auc:search RatingUrl,omitempty"`
}

type ChiSellingListCharityOption

type ChiSellingListCharityOption struct {
	ChiProportion int `xml:"urn:yahoo:jp:auc:categoryLeaf Proportion,omitempty"`
}

type ChiSellingListImage

type ChiSellingListImage struct {
	Attr_height string `xml:" height,attr"`
	Attr_width  string `xml:" width,attr"`
	Text        string `xml:",chardata"`
}

type ChiSellingListItem

type ChiSellingListItem struct {
	ChiAuctionID      string                       `xml:"urn:yahoo:jp:auc:sellingList AuctionID,omitempty"`
	ChiAuctionItemUrl string                       `xml:"urn:yahoo:jp:auc:sellingList AuctionItemUrl,omitempty"`
	ChiBidOrBuy       float64                      `xml:"urn:yahoo:jp:auc:sellingList BidOrBuy,omitempty"`
	ChiBids           int                          `xml:"urn:yahoo:jp:auc:sellingList Bids,omitempty"`
	ChiCharityOption  *ChiSellingListCharityOption `xml:"urn:yahoo:jp:auc:sellingList CharityOption,omitempty"`
	ChiCurrentPrice   float64                      `xml:"urn:yahoo:jp:auc:sellingList CurrentPrice,omitempty"`
	ChiEndTime        time.Time                    `xml:"urn:yahoo:jp:auc:sellingList EndTime,omitempty"`
	ChiImage          *ChiSellingListImage         `xml:"urn:yahoo:jp:auc:sellingList Image,omitempty"`
	ChiIsReserved     bool                         `xml:"urn:yahoo:jp:auc:sellingList IsReserved,omitempty"`
	ChiItemUrl        string                       `xml:"urn:yahoo:jp:auc:sellingList ItemUrl,omitempty"`
	ChiOption         *ChiSellingListOption        `xml:"urn:yahoo:jp:auc:sellingList Option,omitempty"`
	ChiTitle          string                       `xml:"urn:yahoo:jp:auc:sellingList Title,omitempty"`
}

type ChiSellingListOption

type ChiSellingListOption struct {
	ChiBuynowIcon        string `xml:"urn:yahoo:jp:auc:sellingList BuynowIcon,omitempty"`
	ChiEasyPaymentIcon   string `xml:"urn:yahoo:jp:auc:sellingList EasyPaymentIcon,omitempty"`
	ChiIsBackGroundColor bool   `xml:"urn:yahoo:jp:auc:sellingList IsBackGroundColor,omitempty"`
	ChiIsBold            bool   `xml:"urn:yahoo:jp:auc:sellingList IsBold,omitempty"`
	ChiIsCharity         bool   `xml:"urn:yahoo:jp:auc:sellingList IsCharity,omitempty"`
	ChiIsOffer           bool   `xml:"urn:yahoo:jp:auc:sellingList IsOffer,omitempty"`
	ChiNewItemIcon       string `xml:"urn:yahoo:jp:auc:sellingList NewItemIcon,omitempty"`
}

type ChiSellingListRating

type ChiSellingListRating struct {
	ChiIsDeleted   bool `xml:"urn:yahoo:jp:auc:sellingList IsDeleted,omitempty"`
	ChiIsSuspended bool `xml:"urn:yahoo:jp:auc:sellingList IsSuspended,omitempty"`
	ChiPoint       int  `xml:"urn:yahoo:jp:auc:sellingList Point,omitempty"`
}

type ChiSellingListResult

type ChiSellingListResult struct {
	ChiSellingListItem   []*ChiSellingListItem `xml:"urn:yahoo:jp:auc:sellingList Item,omitempty"`
	ChiSellingListSeller *ChiSellingListSeller `xml:"urn:yahoo:jp:auc:sellingList Seller,omitempty"`
}

type ChiSellingListResultSet

type ChiSellingListResultSet struct {
	Attr_firstResultPosition   string                `xml:" firstResultPosition,attr"`
	Attr_xsi_schemaLocation    string                `xml:"http://www.w3.org/2001/XMLSchema-instance schemaLocation,attr"`
	Attr_totalResultsAvailable string                `xml:" totalResultsAvailable,attr"`
	Attr_totalResultsReturned  string                `xml:" totalResultsReturned,attr"`
	Attr_xmlns                 string                `xml:" xmlns,attr"`
	Attr_xsi                   string                `xml:"xmlns xsi,attr"`
	ChiSellingListResult       *ChiSellingListResult `xml:"urn:yahoo:jp:auc:sellingList Result,omitempty"`
}

type ChiSellingListSeller

type ChiSellingListSeller struct {
	ChiAboutUrl          string                `xml:"urn:yahoo:jp:auc:sellingList AboutUrl,omitempty"`
	ChiId                string                `xml:"urn:yahoo:jp:auc:sellingList Id,omitempty"`
	ChiItemListUrl       string                `xml:"urn:yahoo:jp:auc:sellingList ItemListUrl,omitempty"`
	ChiSellingListRating *ChiSellingListRating `xml:"urn:yahoo:jp:auc:sellingList Rating,omitempty"`
	ChiRatingUrl         string                `xml:"urn:yahoo:jp:auc:sellingList RatingUrl,omitempty"`
}

type ChiSellingListroot

type ChiSellingListroot struct {
	ChiResultSet *ChiResultSet `xml:"urn:yahoo:jp:auc:sellingList ResultSet,omitempty"`
}

type Chiroot

type Chiroot struct {
	ChiResultSet *ChiResultSet `xml:"urn:yahoo:jp:auc:search ResultSet,omitempty"`
}

type Client

type Client struct {
	URL        *url.URL
	HTTPClient *http.Client

	AuthToken string

	Logger *log.Logger
}

func NewClient

func NewClient(authToken string, logger *log.Logger) (*Client, error)

func (*Client) GetCategoryIdByName

func (c *Client) GetCategoryIdByName(clist []ChiChildCategory, categoryName string) (int, error)

func (*Client) GetCategoryIdList

func (c *Client) GetCategoryIdList(clist []ChiChildCategory) ([]int, error)

func (*Client) GetCategoryList

func (c *Client) GetCategoryList(ctx context.Context) ([]ChiChildCategory, error)

func (*Client) GetCategoryNameList

func (c *Client) GetCategoryNameList(clist []ChiChildCategory) ([]string, error)

func (*Client) GetItemListBySellerID

func (c *Client) GetItemListBySellerID(ctx context.Context, sellerID string) ([]ChiSellingListItem, error)

func (*Client) GetItemsList

func (c *Client) GetItemsList(ctx context.Context, categoryId int) ([]ChiItem, error)

func (*Client) GetItemsListBySearch

func (c *Client) GetItemsListBySearch(ctx context.Context, keyword string) ([]ChiSearchItem, error)

func (*Client) GetSellerInfomation

func (c *Client) GetSellerInfomation(ctx context.Context, sellerID string) (*ChiSellingListSeller, error)

Jump to

Keyboard shortcuts

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