Documentation
¶
Index ¶
- Constants
- Variables
- func Get(url string, params interface{}, res interface{}) (*http.Response, error)
- func GetParamsString(url string, params string, res interface{}) (*http.Response, error)
- type Cache
- type CacheEntry
- type Feeds
- type FeedsConfig
- type Flags
- type Image
- type ItemImage
- type NextPage
- type Queries
- type Query
- type ReqMapsHerePlace
- type ReqSearch
- type ResItem
- type ResMapsHerePlace
- type ResSearch
- type SearchObject
- type SearchOpts
- type User
Constants ¶
View Source
const ( USER_AGENT = "Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0" URL = "https://es.wallapop.com" URLAPIV3 = "https://api.wallapop.com/api/v3" )
Variables ¶
View Source
var (
ErrFeedNotFound = errors.New("feed not found")
)
View Source
var KEY = []byte("Tm93IHRoYXQgeW91J3ZlIGZvdW5kIHRoaXMsIGFyZSB5b3UgcmVhZHkgdG8gam9pbiB1cz8gam9ic0B3YWxsYXBvcC5jb20==")
Functions ¶
Types ¶
type CacheEntry ¶
type Feeds ¶
type Feeds struct {
// contains filtered or unexported fields
}
func NewFeeds ¶
func NewFeeds(queries *Queries, cfg FeedsConfig) *Feeds
type FeedsConfig ¶
type NextPage ¶
func NewNextPage ¶
type ReqMapsHerePlace ¶
type ReqMapsHerePlace struct {
PlaceID string `url:"placeId"`
}
type ReqSearch ¶
type ReqSearch struct {
Distance float32 `url:"distance"`
Keywords string `url:"keywords"`
FiltersSource string `url:"filters_source"`
OrderBy string `url:"order_by"`
MinSalePrice int `url:"min_sale_price"`
MaxSalePrice int `url:"max_sale_price"`
Latitude float32 `url:"latitude"`
Longitude float32 `url:"longitude"`
Language string `url:"language"`
}
type ResItem ¶
type ResMapsHerePlace ¶
type ResMapsHerePlace struct {
Latitude float32 `json:"latitude"`
Longitude float32 `json:"longitude"`
}
func GetLocation ¶
func GetLocation(place string) (*ResMapsHerePlace, error)
type ResSearch ¶
type ResSearch struct {
SearchObjects []SearchObject `json:"search_objects"`
}
type SearchObject ¶
type SearchObject struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Distance float32 `json:"distance"`
Images []Image `json:"images"`
User User `json:"user"`
Flags Flags `json:"flags"`
Price float32 `json:"price"`
Currency string `json:"currency"`
WebSlug string `json:"web_slug"`
}
type SearchOpts ¶
Click to show internal directories.
Click to hide internal directories.