api

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Client           *resty.Client
	UserAgent        string
	AuthToken        string
	MaxRetryAttempts uint
}

func NewClient

func NewClient() *Client

func (*Client) GetGuestToken

func (c *Client) GetGuestToken() (string, error)

func (*Client) Request

func (c *Client) Request() *resty.Request

func (*Client) Search

func (c *Client) Search(opts *SearchOptions) (*json.Adaptive, error)

func (*Client) SearchAll

func (c *Client) SearchAll(opts SearchOptions) <-chan *SearchResult

type Query

type Query struct {
	Text     string
	Since    string
	Until    string
	From     string
	To       string
	Lang     string
	Filters  []string
	Includes []string
	Excludes []string
	Geocode  string
	Near     string
	Within   string
	Url      string
}

func (*Query) Encode

func (q *Query) Encode() string

func (*Query) IsEmpty

func (q *Query) IsEmpty() bool

type SearchOptions

type SearchOptions struct {
	GuestToken string
	Cursor     string
	Query      Query
	Top        bool
}

type SearchResult

type SearchResult struct {
	Adaptive *json.Adaptive
	Error    error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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