services

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2021 License: Unlicense Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BingConfig

type BingConfig struct {
	AspectRatio  string
	Compact      bool
	ImageColor   string
	ImageSize    string
	ImageType    string
	PeopleFilter string
	Query        string
	SafeSearch   string
}

BingConfig is a set of options used by BingScraper to perform/filter/format search results.

type BingResult

type BingResult struct {
	Height       int    `json:"-"`
	Width        int    `json:"-"`
	ReferenceURL string `json:"purl"`
	ThumbnailURL string `json:"turl"`
	Title        string `json:"t"`
	URL          string `json:"murl"`
}

BingResult is a set of attributes that defines an image result.

type BingScraper

type BingScraper struct {
	Config *BingConfig
}

BingScraper represents scraper for bing image search.

func (BingScraper) Scrape

func (b BingScraper) Scrape() ([]interface{}, int, error)

Scrape parses and returns the results from bing image search if successful. An error is returned otherwise.

type FlickrConfig

type FlickrConfig struct {
	Compact     bool
	ImageColor  string
	ImageSize   string
	ImageType   string
	Orientation string
	Query       string
	SafeSearch  string
}

FlickrConfig is a set of options used by FlickrScraper to perform/filter/format search results.

type FlickrResult

type FlickrResult struct {
	Height       int    `json:"height_o"`
	Width        int    `json:"width_o"`
	Owner        string `json:"owner"`
	ID           string `json:"id"`
	ReferenceURL string `json:"-"`
	ThumbnailURL string `json:"url_t"`
	Title        string `json:"title"`
	URL          string `json:"url_o"`
}

FlickrResult is a set of attributes that defines an image result.

type FlickrScraper

type FlickrScraper struct {
	Config *FlickrConfig
}

FlickrScraper represents scraper for flickr image search.

func (FlickrScraper) Scrape

func (f FlickrScraper) Scrape() ([]interface{}, int, error)

Scrape parses and returns the results from flickr image search if successful. An error is returned otherwise.

type GoogleConfig

type GoogleConfig struct {
	AspectRatio string
	Compact     bool
	ImageColor  string
	ImageSize   string
	ImageType   string
	Query       string
	SafeSearch  string
}

GoogleConfig is a set of options used by GoogleScraper to perform/filter/format search results.

type GoogleResult

type GoogleResult struct {
	Height       int    `json:"oh"`
	Width        int    `json:"ow"`
	ReferenceURL string `json:"ru"`
	ThumbnailURL string `json:"tu"`
	Title        string `json:"pt"`
	URL          string `json:"ou"`
}

GoogleResult is a set of attributes that defines an image result.

type GoogleScraper

type GoogleScraper struct {
	Config *GoogleConfig
}

GoogleScraper represents scraper for google image search.

func (GoogleScraper) Scrape

func (g GoogleScraper) Scrape() ([]interface{}, int, error)

Scrape parses and returns the results from google image search if successful. An error is returned otherwise.

Jump to

Keyboard shortcuts

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