grabber

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	Id   int
	Name string
	Url  string
}

type Grabber

type Grabber struct {
	Api          *api_public.TokopediaApiPublic
	Filter       *filter.BaseFilter
	CacheHandler *grab_handler.CacheProductHandler
}

type ProductCategoryGrabber

type ProductCategoryGrabber struct {
	Grabber
	Category Category
	// contains filtered or unexported fields
}

Product Category

func (*ProductCategoryGrabber) IteratePages

func (grab *ProductCategoryGrabber) IteratePages(prodResp chan<- grab_handler.ProductCategoryGrabResp)

func (*ProductCategoryGrabber) Run

func (*ProductCategoryGrabber) RunProductGrabber

func (grab *ProductCategoryGrabber) RunProductGrabber() ([]model_public.CategoryProduct, error)

func (*ProductCategoryGrabber) Save

func (grab *ProductCategoryGrabber) Save(namespace string, product *grab_handler.ProductCategoryGrabResp)

type ProductGrabber

type ProductGrabber struct {
	Api *api_public.TokopediaApiPublic

	Filter *filter.BaseFilter
	// contains filtered or unexported fields
}

func (*ProductGrabber) IteratePages

func (grab *ProductGrabber) IteratePages(prodResp chan<- model_public.ProductSearch) error

func (*ProductGrabber) RunProductGrabber

func (grab *ProductGrabber) RunProductGrabber() ([]model_public.ProductSearch, error)

type ProductListGrabber

type ProductListGrabber struct {
	ProductGrabber
	Keywords []string
	// contains filtered or unexported fields
}

Product List

func NewProductListGrabber

func NewProductListGrabber(keywords []string) (*ProductListGrabber, error)

func (*ProductListGrabber) Run

func (grab *ProductListGrabber) Run(prodResp chan<- grab_handler.ProductListGrabberResp)

type ShopGrabber

type ShopGrabber struct {
	Api *api_public.TokopediaApiPublic

	Filter *filter.BaseFilter
	// contains filtered or unexported fields
}

func (*ShopGrabber) RunShopGrabber

func (grab *ShopGrabber) RunShopGrabber(prodResp chan<- model_public.ShopProductData) error

type ShopListGrabber

type ShopListGrabber struct {
	ShopGrabber
	Shops    []string
	Pathfile string
}

func CreateShopListGrabber

func CreateShopListGrabber(shops []string, pathfile string) (*ShopListGrabber, error)

func (*ShopListGrabber) Run

func (grab *ShopListGrabber) Run(prodResp chan<- grab_handler.ShopGrabberResp) error

type UrlGrabber

type UrlGrabber struct {
	Api    *api_public.TokopediaApiPublic
	Urls   []string
	Filter *filter.BaseFilter
}

func CreateUrlGrabber

func CreateUrlGrabber(urls []string) (*UrlGrabber, error)

func (*UrlGrabber) Run

func (grab *UrlGrabber) Run() ([]*grab_handler.UrlGrabberResp, error)

Jump to

Keyboard shortcuts

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