gmaps

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type About added in v1.0.0

type About struct {
	ID      string   `json:"id"`
	Name    string   `json:"name"`
	Options []Option `json:"options"`
}

type Address added in v1.0.0

type Address struct {
	Borough    string `json:"borough"`
	Street     string `json:"street"`
	City       string `json:"city"`
	PostalCode string `json:"postal_code"`
	State      string `json:"state"`
	Country    string `json:"country"`
}

type Entry

type Entry struct {
	Link             string              `json:"link"`
	Cid              string              `json:"cid"`
	Title            string              `json:"title"`
	Categories       []string            `json:"categories"`
	Category         string              `json:"category"`
	Address          string              `json:"address"`
	OpenHours        map[string][]string `json:"open_hours"`
	WebSite          string              `json:"web_site"`
	Phone            string              `json:"phone"`
	PlusCode         string              `json:"plus_code"`
	ReviewCount      int                 `json:"review_count"`
	ReviewRating     float64             `json:"review_rating"`
	ReviewsPerRating map[int]int         `json:"reviews_per_rating"`
	Latitude         float64             `json:"latitude"`
	Longtitude       float64             `json:"longtitude"`
	Status           string              `json:"status"`
	Description      string              `json:"description"`
	ReviewsLink      string              `json:"reviews_link"`
	Thumbnail        string              `json:"thumbnail"`
	Timezone         string              `json:"timezone"`
	PriceRange       string              `json:"price_range"`
	DataID           string              `json:"data_id"`
	Images           []Image             `json:"images"`
	Reservations     []LinkSource        `json:"reservations"`
	OrderOnline      []LinkSource        `json:"order_online"`
	Menu             LinkSource          `json:"menu"`
	Owner            Owner               `json:"owner"`
	CompleteAddress  Address             `json:"complete_address"`
	About            []About             `json:"about"`
	UserReviews      []Review            `json:"user_reviews"`
}

func EntryFromJSON added in v1.0.0

func EntryFromJSON(raw []byte) (entry Entry, err error)

func (*Entry) CsvHeaders

func (e *Entry) CsvHeaders() []string

func (*Entry) CsvRow

func (e *Entry) CsvRow() []string

func (*Entry) Validate

func (e *Entry) Validate() error

type GmapJob

type GmapJob struct {
	scrapemate.Job

	MaxDepth int
	LangCode string
}

func NewGmapJob

func NewGmapJob(langCode, query string, maxDepth int) *GmapJob

func (*GmapJob) BrowserActions

func (j *GmapJob) BrowserActions(ctx context.Context, page playwright.Page) scrapemate.Response

func (*GmapJob) Process

func (j *GmapJob) Process(ctx context.Context, resp *scrapemate.Response) (any, []scrapemate.IJob, error)

func (*GmapJob) UseInResults

func (j *GmapJob) UseInResults() bool

type Image added in v1.0.0

type Image struct {
	Title string `json:"title"`
	Image string `json:"image"`
}

type LinkSource added in v1.0.0

type LinkSource struct {
	Link   string `json:"link"`
	Source string `json:"source"`
}

type Option added in v1.0.0

type Option struct {
	Name    string `json:"name"`
	Enabled bool   `json:"enabled"`
}

type Owner added in v1.0.0

type Owner struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Link string `json:"link"`
}

type PlaceJob

type PlaceJob struct {
	scrapemate.Job
}

func NewPlaceJob

func NewPlaceJob(parentID, langCode, u string) *PlaceJob

func (*PlaceJob) BrowserActions

func (j *PlaceJob) BrowserActions(_ context.Context, page playwright.Page) scrapemate.Response

func (*PlaceJob) Process

func (j *PlaceJob) Process(_ context.Context, resp *scrapemate.Response) (any, []scrapemate.IJob, error)

type Review added in v1.0.0

type Review struct {
	Name           string
	ProfilePicture string
	Rating         int
	Description    string
	Images         []string
	When           string
}

Jump to

Keyboard shortcuts

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