reviews

package
v0.0.0-...-52dbf3a Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: LGPL-3.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTokenIsEmpty = fmt.Errorf("Token is empty")

Functions

This section is empty.

Types

type Options

type Options struct {
	Country  string
	Language string
	Number   int
	Sorting  store.Sort
}

Options of reviews

type Results

type Results []*Review

Results of operation

func (*Results) Append

func (results *Results) Append(res ...Review)

Append result

type Review

type Review struct {
	Avatar         string
	Criteria       map[string]int64
	ID             string
	Score          int
	Reviewer       string
	Reply          string
	ReplyTimestamp time.Time
	Respondent     string
	Text           string
	Timestamp      time.Time
	Useful         int
	Version        string
}

Review of app

func Parse

func Parse(review string) *Review

Parse app review

func (*Review) URL

func (r *Review) URL(appID string) string

URL of review

type Reviews

type Reviews struct {
	Results Results
	// contains filtered or unexported fields
}

Reviews instance

func New

func New(appID string, options Options) *Reviews

New return similar list instance

func (*Reviews) LoadFirstPage

func (reviews *Reviews) LoadFirstPage() ([]Review, string, error)

only load first page of reviews

func (*Reviews) LoadNextPage

func (reviews *Reviews) LoadNextPage(token string) (results []Review, newToken string, err error)

continue loading next page

func (*Reviews) Run

func (reviews *Reviews) Run() error

Run reviews scraping

Jump to

Keyboard shortcuts

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