Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MultiSearch ¶
func MultiSearch(sites []string, opts SearchOptions) (map[string]*SearchResults, error)
func StartServer ¶
Types ¶
type Listing ¶
type Listing struct { Id string `json:"id"` Title string `json:"title"` Description string `json:"description,omitempty"` URL string `json:"url"` Price int `json:"price"` Images []Image `json:"images"` Attributes map[string]string `json:"attributes,omitempty"` Location *LatLng `json:"location,omitempty"` PostedAt *time.Time `json:"posted_at,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` }
func GetListing ¶
type SearchOptions ¶
type SearchOptions struct { Category string `form:"category"` Query string `form:"query"` TitlesOnly bool `form:"titles_only"` HasImage bool `form:"has_image"` PostedToday bool `form:"posted_today"` BundleDuplicates bool `form:"bundle_duplicates"` IncludeNearby bool `form:"include_nearby"` MinPrice int `form:"min_price"` MaxPrice int `form:"max_price"` Skip int `form:"skip"` Params map[string]string }
type SearchResults ¶
type SearchResults struct { RangeFrom int `json:"range_from"` RangeTo int `json:"range_to"` TotalCount int `json:"total_count"` Listings []Listing `json:"listings"` }
func ParseSearchResults ¶
func ParseSearchResults(reader io.Reader) (*SearchResults, error)
func Search ¶
func Search(siteId string, opts SearchOptions) (*SearchResults, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.