datafetch

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2025 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GoogleMapsStores

func GoogleMapsStores() *googleMapsStoreCrawler

GoogleMapsStores returns a crawler for Google Maps store data. Returns nil if failed to initialize.

Types

type GoogleMapsStoreData added in v0.1.3

type GoogleMapsStoreData struct {
	ID   string
	Name string
}

type GoogleMapsStoreReview added in v0.1.1

type GoogleMapsStoreReview struct {
	Reviewer      string `json:"reviewer"`
	ReviewerID    string `json:"reviewer_id"`
	ReviewerState string `json:"reviewer_state"`
	ReviewerLevel int    `json:"reviewer_level"`
	ReviewTime    string `json:"review_time"`
	ReviewDate    string `json:"review_date"`
	Content       string `json:"content"`
	Rating        int    `json:"rating"`
}

GoogleMapsStoreReview is a struct for Google Maps store reviews.

type GoogleMapsStoreReviewSortBy added in v0.1.1

type GoogleMapsStoreReviewSortBy uint8
const (
	// SortByRelevance 按相關性排序
	SortByRelevance GoogleMapsStoreReviewSortBy = 1
	// SortByNewest 按最新排序
	SortByNewest GoogleMapsStoreReviewSortBy = 2
	// SortByRating 按評分排序
	SortByHighestRating GoogleMapsStoreReviewSortBy = 3
	// SortByLowestRating 按最低評分排序
	SortByLowestRating GoogleMapsStoreReviewSortBy = 4
)

type GoogleMapsStoreReviews added in v0.1.2

type GoogleMapsStoreReviews []GoogleMapsStoreReview

GoogleMapsStoreReviews is a slice of GoogleMapsStoreReview.

func (GoogleMapsStoreReviews) ToDataTable added in v0.1.2

func (reviews GoogleMapsStoreReviews) ToDataTable() *insyra.DataTable

ToDataTable converts the reviews to a DataTable.

type GoogleMapsStoreReviewsFetchingOptions added in v0.1.1

type GoogleMapsStoreReviewsFetchingOptions struct {
	SortBy GoogleMapsStoreReviewSortBy
	// MaxWaitingInterval_Milliseconds is the maximum waiting interval in milliseconds between requests.
	MaxWaitingInterval_Milliseconds uint
}

GoogleMapsStoreReviewsFetchingOptions is a struct for options when fetching reviews.

Jump to

Keyboard shortcuts

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