api_public

package
v1.1.16 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClientApi *http.Client = &http.Client{
	Transport: &http.Transport{
		MaxIdleConnsPerHost: 5,
	},
	Timeout: 30 * time.Second,
}
View Source
var ErrGraphqlBatchNoOperationName = errors.New("graphql batch no operation name")
View Source
var ErrGraphqlBatchNoQuery = errors.New("graphql batch no query")

Functions

func GetDataAllFilterConfig added in v1.1.2

func GetDataAllFilterConfig(fname string) (*os.File, error)

Types

type Fcity added in v1.1.2

type Fcity struct {
	Description string `json:"Description"`
	Typename    string `json:"__typename"`
	Child       []any  `json:"child"`
	HexColor    string `json:"hexColor"`
	Icon        string `json:"icon"`
	InputType   string `json:"inputType"`
	IsNew       bool   `json:"isNew"`
	IsPopular   bool   `json:"isPopular"`
	Key         string `json:"key"`
	Name        string `json:"name"`
	TotalData   string `json:"totalData"`
	ValMax      string `json:"valMax"`
	ValMin      string `json:"valMin"`
	Value       string `json:"value"`
}

func GetFcity added in v1.1.2

func GetFcity(fname string) ([]*Fcity, error)

type GraphqlPayload

type GraphqlPayload struct {
	OperationName string      `json:"operationName"`
	Variables     interface{} `json:"variables"`
	Query         string      `json:"query"`
}

type SessionPublic

type SessionPublic struct {
	Cookies []*http.Cookie
	Ua      string
}

func (*SessionPublic) Update added in v1.1.5

func (sess *SessionPublic) Update(cookies []*http.Cookie) error

type TokopediaApiPublic

type TokopediaApiPublic struct {
	Session SessionPublic
}

func NewTokopediaApiPublic

func NewTokopediaApiPublic() (*TokopediaApiPublic, error)

func (*TokopediaApiPublic) AceSearchShop

func (*TokopediaApiPublic) CategoryAllListLite

func (api *TokopediaApiPublic) CategoryAllListLite() (*model_public.CategoryAllListLiteResp, error)

func (*TokopediaApiPublic) DiscussionDataByProductID

func (*TokopediaApiPublic) FilterSortProductQuery

func (api *TokopediaApiPublic) FilterSortProductQuery(payload *model_public.ParamsVar) (*model_public.FilterSortProductResp, error)

func (*TokopediaApiPublic) GetDrogonAnnotation

func (*TokopediaApiPublic) GetShopOperationalHourStatus

func (api *TokopediaApiPublic) GetShopOperationalHourStatus(payload *model_public.ShopIdVar) (*model_public.GetShopOperationalHourStatusResp, error)

func (*TokopediaApiPublic) HeaderMainData added in v1.1.5

func (api *TokopediaApiPublic) HeaderMainData() (*model_public.HeaderMainDataResp, error)

func (*TokopediaApiPublic) JarvisRecommendation

func (api *TokopediaApiPublic) JarvisRecommendation(prodname string) (*model_public.JarvisRecommendationResp, error)

category recom

func (*TokopediaApiPublic) LocDisctricRecommendation

func (*TokopediaApiPublic) NewGraphqlReq

func (api *TokopediaApiPublic) NewGraphqlReq(payload *GraphqlPayload) *http.Request

func (*TokopediaApiPublic) NewGraphqlReqBatch added in v1.1.5

func (api *TokopediaApiPublic) NewGraphqlReqBatch(operationName string, payloads []*GraphqlPayload) (*http.Request, error)

func (*TokopediaApiPublic) NewRequest

func (api *TokopediaApiPublic) NewRequest(method, ur string, query any, body io.Reader) *http.Request

func (*TokopediaApiPublic) PdpGetDataP2

func (*TokopediaApiPublic) PdpGetReiewImageQuery

func (*TokopediaApiPublic) PdpGetlayoutQuery

func (*TokopediaApiPublic) PdpGetlayoutQueryBatch added in v1.1.5

func (api *TokopediaApiPublic) PdpGetlayoutQueryBatch(payloads []*model_public.PdpGetlayoutQueryVar) ([]*model_public.PdpGetlayoutQueryResp, error)

func (*TokopediaApiPublic) PdpGetlayoutQueryFromUrl added in v1.1.7

func (api *TokopediaApiPublic) PdpGetlayoutQueryFromUrl(uristr string) (*model_public.PdpGetlayoutQueryResp, error)

func (*TokopediaApiPublic) PdpShopNote

func (*TokopediaApiPublic) ProductRatingandTopics

func (*TokopediaApiPublic) ProductReviewList

func (*TokopediaApiPublic) RatesEstimateQuery added in v1.0.2

func (*TokopediaApiPublic) RecomWidget

func (*TokopediaApiPublic) SearchProductQuery added in v1.0.2

func (*TokopediaApiPublic) SearchProductQueryV4

func (api *TokopediaApiPublic) SearchProductQueryV4(payload *model_public.ParamsVar) (*model_public.SearchProductQueryV4Resp, error)

func (*TokopediaApiPublic) SendRequest

func (api *TokopediaApiPublic) SendRequest(req *http.Request, hasil any) error

func (*TokopediaApiPublic) ShopCoreInfo

func (*TokopediaApiPublic) ShopNote

func (*TokopediaApiPublic) ShopPageLayoutV2

func (*TokopediaApiPublic) ShopProducts

func (*TokopediaApiPublic) ShopSpeedQuery

func (*TokopediaApiPublic) ShopStatisticQuery

func (*TokopediaApiPublic) TopadsProductQuery

func (*TokopediaApiPublic) VoucherListQuery

Jump to

Keyboard shortcuts

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