292 lines
12 KiB
Go
292 lines
12 KiB
Go
|
package fsq
|
||
|
|
||
|
import (
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
type (
|
||
|
Options struct {
|
||
|
LatLong string `url:"ll"`
|
||
|
Radius int64 `url:"radius"`
|
||
|
Category string `url:"categories,omitempty"`
|
||
|
Key string `url:"-"`
|
||
|
}
|
||
|
)
|
||
|
|
||
|
type CustomTime struct {
|
||
|
time.Time
|
||
|
}
|
||
|
|
||
|
type (
|
||
|
FoursquarePlaces struct {
|
||
|
Results []Results4sqPlaces `json:"results"`
|
||
|
}
|
||
|
Results4sqPlaces struct {
|
||
|
FsqId string `json:"fsq_id"`
|
||
|
Categories []Categories4sqPlaces `json:"categories"`
|
||
|
Chains []Chains4sqPlaces `json:"chains,omitempty"`
|
||
|
ClosedBucket string `json:"closed_bucket,omitempty"`
|
||
|
DateClosed CustomTime `json:"date_closed,omitempty"`
|
||
|
Description string `json:"description,omitempty"`
|
||
|
Distance int64 `json:"distance,omitempty"`
|
||
|
Email string `json:"email,omitempty"`
|
||
|
Fax string `json:"fax,omitempty"`
|
||
|
Features Features4sqPlaces `json:"features,omitempty"`
|
||
|
Geocodes Geocodes4sqPlaces `json:"geocodes,omitempty"`
|
||
|
Hours Hours4sqPlaces `json:"hours,omitempty"`
|
||
|
HoursPopular []HoursSlots4sqPlaces `json:"hours_popular,omitempty"`
|
||
|
Link string `json:"link,omitempty"`
|
||
|
Location Location4sqPlaces `json:"location,omitempty"`
|
||
|
Photos []Photos4sqPlaces `json:"photos,omitempty"`
|
||
|
Popularity int64 `json:"popularity,omitempty"`
|
||
|
Price int64 `json:"price,omitempty"`
|
||
|
Rating int64 `json:"rating,omitempty"`
|
||
|
Name string `json:"name,omitempty"`
|
||
|
RelatedPlaces struct{} `json:"related_places,omitempty"`
|
||
|
SocialMedia SocialMedia4sqPlaces `json:"social_media,omitempty"`
|
||
|
Stats Stats4sqPlaces `json:"stats,omitempty"`
|
||
|
StoreId string `json:"store_id,omitempty"`
|
||
|
Tastes []string `json:"tastes,omitempty"`
|
||
|
Tel string `json:"tel,omitempty"`
|
||
|
Timezone string `json:"timezone,omitempty"`
|
||
|
Tips []Tips4sqPlaces `json:"tips,omitempty"`
|
||
|
VenueRealityBucket string `json:"venue_reality_bucket,omitempty"`
|
||
|
Verified bool `json:"verified,omitempty"`
|
||
|
Website string `json:"website,omitempty"`
|
||
|
}
|
||
|
)
|
||
|
|
||
|
type Categories4sqPlaces struct {
|
||
|
Id int64 `json:"id"`
|
||
|
Name string `json:"name"`
|
||
|
ShortName string `json:"short_name,omitempty"`
|
||
|
PluralName string `json:"plural_name,omitempty"`
|
||
|
Icon Icon4sqPlaces `json:"icon,omitempty"`
|
||
|
}
|
||
|
|
||
|
type Icon4sqPlaces struct {
|
||
|
Id string `json:"id,omitempty"`
|
||
|
CreateAt CustomTime `json:"create_at,omitempty"`
|
||
|
Prefix string `json:"prefix"`
|
||
|
Suffix string `json:"suffix"`
|
||
|
Width int64 `json:"width,omitempty"`
|
||
|
Height int64 `json:"height,omitempty"`
|
||
|
Classifications []string `json:"classifications,omitempty"`
|
||
|
Tip Tip4sqPlaces `json:"tip,omitempty"`
|
||
|
}
|
||
|
|
||
|
type Chains4sqPlaces struct {
|
||
|
Id string `json:"id"`
|
||
|
Name string `json:"name"`
|
||
|
}
|
||
|
|
||
|
type Tip4sqPlaces struct {
|
||
|
Id string `json:"id"`
|
||
|
CreatedAt CustomTime `json:"created_at,omitempty"`
|
||
|
Text string `json:"text"`
|
||
|
Url string `json:"url,omitempty"`
|
||
|
Lang string `json:"lang,omitempty"`
|
||
|
AgreeCount int64 `json:"agree_count,omitempty"`
|
||
|
DisagreeCount int64 `json:"disagree_count,omitempty"`
|
||
|
}
|
||
|
|
||
|
type Features4sqPlaces struct {
|
||
|
Payment Payment4sqPlaces `json:"payment,omitempty"`
|
||
|
FoodAndDrink FoodAndDrink4sqPlaces `json:"food_and_drink,omitempty"`
|
||
|
Services Services4sqPlaces `json:"services,omitempty"`
|
||
|
Amenities Amenities4sqPlaces `json:"amenities,omitempty"`
|
||
|
Attributes Attributes4sqPlaces `json:"attributes,omitempty"`
|
||
|
}
|
||
|
|
||
|
type Payment4sqPlaces struct {
|
||
|
CreditCards CreditCards4sqPlaces `json:"credit_cards,omitempty"`
|
||
|
DigitalWallet DigitalWallet4sqPlaces `json:"digital_wallet,omitempty"`
|
||
|
}
|
||
|
|
||
|
type CreditCards4sqPlaces struct {
|
||
|
AcceptsCreditCards struct{} `json:"accepts_credit_cards,omitempty"`
|
||
|
Amex struct{} `json:"amex,omitempty"`
|
||
|
Discover struct{} `json:"discover,omitempty"`
|
||
|
Visa struct{} `json:"visa,omitempty"`
|
||
|
DinersClub struct{} `json:"diners_club,omitempty"`
|
||
|
MasterCard struct{} `json:"master_card,omitempty"`
|
||
|
UnionPay struct{} `json:"union_pay,omitempty"`
|
||
|
}
|
||
|
|
||
|
type DigitalWallet4sqPlaces struct {
|
||
|
AcceptsNfc struct{} `json:"accepts_nfc,omitempty"`
|
||
|
}
|
||
|
|
||
|
type FoodAndDrink4sqPlaces struct {
|
||
|
Alcohol Alcohol4sqPlaces `json:"alcohol,omitempty"`
|
||
|
Meals Meals4sqPlaces `json:"meals,omitempty"`
|
||
|
}
|
||
|
|
||
|
type Alcohol4sqPlaces struct {
|
||
|
BarService struct{} `json:"bar_service,omitempty"`
|
||
|
Beer struct{} `json:"beer,omitempty"`
|
||
|
Byo struct{} `json:"byo,omitempty"`
|
||
|
Cocktails struct{} `json:"cocktails,omitempty"`
|
||
|
FullBar struct{} `json:"full_bar,omitempty"`
|
||
|
Wine struct{} `json:"wine,omitempty"`
|
||
|
}
|
||
|
|
||
|
type Meals4sqPlaces struct {
|
||
|
BarSnacks struct{} `json:"bar_snacks,omitempty"`
|
||
|
Breakfast struct{} `json:"breakfast,omitempty"`
|
||
|
Brunch struct{} `json:"brunch,omitempty"`
|
||
|
Lunch struct{} `json:"lunch,omitempty"`
|
||
|
HappyHour struct{} `json:"happy_hour,omitempty"`
|
||
|
Dessert struct{} `json:"dessert,omitempty"`
|
||
|
Dinner struct{} `json:"dinner,omitempty"`
|
||
|
TastingMenu struct{} `json:"tasting_menu,omitempty"`
|
||
|
}
|
||
|
|
||
|
type Services4sqPlaces struct {
|
||
|
Delivery struct{} `json:"delivery,omitempty"`
|
||
|
Takeout struct{} `json:"takeout,omitempty"`
|
||
|
DriveThrough struct{} `json:"drive_through,omitempty"`
|
||
|
DineIn DineIn4sqPlaces `json:"dine_in,omitempty"`
|
||
|
}
|
||
|
|
||
|
type DineIn4sqPlaces struct {
|
||
|
Reservations struct{} `json:"reservations,omitempty"`
|
||
|
OnlineReservations struct{} `json:"online_reservations,omitempty"`
|
||
|
GroupsOnlyReservations struct{} `json:"groups_only_reservations,omitempty"`
|
||
|
EssentialReservations struct{} `json:"essential_reservations,omitempty"`
|
||
|
}
|
||
|
|
||
|
type Amenities4sqPlaces struct {
|
||
|
Restroom struct{} `json:"restroom,omitempty"`
|
||
|
Smoking struct{} `json:"smoking,omitempty"`
|
||
|
Jukebox struct{} `json:"jukebox,omitempty"`
|
||
|
Music struct{} `json:"music,omitempty"`
|
||
|
LiveMusic struct{} `json:"live_music,omitempty"`
|
||
|
PrivateRoom struct{} `json:"private_room,omitempty"`
|
||
|
OutdoorSeating struct{} `json:"outdoor_seating,omitempty"`
|
||
|
Tvs struct{} `json:"tvs,omitempty"`
|
||
|
Atm struct{} `json:"atm,omitempty"`
|
||
|
CoatCheck struct{} `json:"coat_check,omitempty"`
|
||
|
WheelchairAccessible struct{} `json:"wheelchair_accessible,omitempty"`
|
||
|
Parking Parking4sqPlaces `json:"parking,omitempty"`
|
||
|
SitDownDining struct{} `json:"sit_down_dining,omitempty"`
|
||
|
Wifi string `json:"wifi,omitempty"`
|
||
|
}
|
||
|
|
||
|
type Parking4sqPlaces struct {
|
||
|
Parking struct{} `json:"parking,omitempty"`
|
||
|
StreetParking struct{} `json:"street_parking,omitempty"`
|
||
|
ValetParking struct{} `json:"valet_parking,omitempty"`
|
||
|
PublicLot struct{} `json:"public_lot,omitempty"`
|
||
|
PrivateLot struct{} `json:"private_lot,omitempty"`
|
||
|
}
|
||
|
|
||
|
type Attributes4sqPlaces struct {
|
||
|
BusinessMeeting string `json:"business_meeting,omitempty"`
|
||
|
Clean string `json:"clean,omitempty"`
|
||
|
Crowded string `json:"crowded,omitempty"`
|
||
|
DatesPopular string `json:"dates_popular,omitempty"`
|
||
|
FamiliesPopular string `json:"families_popular,omitempty"`
|
||
|
GlutenFreeDiet string `json:"gluten_free_diet,omitempty"`
|
||
|
GoodForDogs string `json:"good_for_dogs,omitempty"`
|
||
|
GroupsPopular string `json:"groups_popular,omitempty"`
|
||
|
HealthyDiet string `json:"healthy_diet,omitempty"`
|
||
|
LateNight string `json:"late_night,omitempty"`
|
||
|
Noisy string `json:"noisy,omitempty"`
|
||
|
QuickBite string `json:"quick_bite,omitempty"`
|
||
|
Romantic string `json:"romantic,omitempty"`
|
||
|
ServiceQuality string `json:"service_quality,omitempty"`
|
||
|
SinglesPopular string `json:"singles_popular,omitempty"`
|
||
|
SpecialOccasion string `json:"special_occasion,omitempty"`
|
||
|
Trendy string `json:"trendy,omitempty"`
|
||
|
ValueForMoney string `json:"value_for_money,omitempty"`
|
||
|
VeganDiet string `json:"vegan_diet,omitempty"`
|
||
|
VegetarianDiet string `json:"vegetarian_diet,omitempty"`
|
||
|
}
|
||
|
|
||
|
type Geocodes4sqPlaces struct {
|
||
|
DropOff LatLong4sqPlaces `json:"drop_off,omitempty"`
|
||
|
FrontDoor LatLong4sqPlaces `json:"front_door,omitempty"`
|
||
|
Main LatLong4sqPlaces `json:"main,omitempty"`
|
||
|
Road LatLong4sqPlaces `json:"road,omitempty"`
|
||
|
Roof LatLong4sqPlaces `json:"roof,omitempty"`
|
||
|
}
|
||
|
|
||
|
type LatLong4sqPlaces struct {
|
||
|
Latitude float64 `json:"latitude,omitempty"`
|
||
|
Longitude float64 `json:"longitude,omitempty"`
|
||
|
}
|
||
|
|
||
|
type Hours4sqPlaces struct {
|
||
|
Display string `json:"display,omitempty"`
|
||
|
IsLocalHoliday bool `json:"is_local_holiday,omitempty"`
|
||
|
OpenNow bool `json:"open_now,omitempty"`
|
||
|
Regular []HoursSlots4sqPlaces `json:"regular,omitempty"`
|
||
|
}
|
||
|
|
||
|
type HoursSlots4sqPlaces struct {
|
||
|
Close string `json:"close,omitempty"`
|
||
|
Day int64 `json:"day,omitempty"`
|
||
|
Open string `json:"open,omitempty"`
|
||
|
}
|
||
|
|
||
|
type Location4sqPlaces struct {
|
||
|
Address string `json:"address,omitempty"`
|
||
|
AddressExtended string `json:"address_extended,omitempty"`
|
||
|
AdminRegion string `json:"admin_region,omitempty"`
|
||
|
CensusBlock string `json:"census_block,omitempty"`
|
||
|
Country string `json:"country,omitempty"`
|
||
|
CrossStreet string `json:"cross_street,omitempty"`
|
||
|
Dma string `json:"dma,omitempty"`
|
||
|
FormattedAddress string `json:"formatted_address,omitempty"`
|
||
|
Locality string `json:"locality,omitempty"`
|
||
|
Neighborhood []string `json:"neighborhood,omitempty"`
|
||
|
PoBox string `json:"po_box,omitempty"`
|
||
|
PostTown string `json:"post_town,omitempty"`
|
||
|
Postcode string `json:"postcode,omitempty"`
|
||
|
Region string `json:"region,omitempty"`
|
||
|
}
|
||
|
|
||
|
type Photos4sqPlaces struct {
|
||
|
Id string `json:"id,omitempty"`
|
||
|
CreatedAt CustomTime `json:"created_at,omitempty"`
|
||
|
Prefix string `json:"prefix,omitempty"`
|
||
|
Suffix string `json:"suffix,omitempty"`
|
||
|
Width int64 `json:"width,omitempty"`
|
||
|
Height int64 `json:"height,omitempty"`
|
||
|
Classifications []string `json:"classifications,omitempty"`
|
||
|
Tip PhotosTip4sqPlaces `json:"tip,omitempty"`
|
||
|
}
|
||
|
|
||
|
type PhotosTip4sqPlaces struct {
|
||
|
Id string `json:"id,omitempty"`
|
||
|
CreatedAt string `json:"created_at,omitempty"`
|
||
|
Text string `json:"text,omitempty"`
|
||
|
Url string `json:"url,omitempty"`
|
||
|
Lang string `json:"lang,omitempty"`
|
||
|
AgreeCount int64 `json:"agree_count,omitempty"`
|
||
|
DisagreeCount int64 `json:"disagree_count,omitempty"`
|
||
|
}
|
||
|
|
||
|
type SocialMedia4sqPlaces struct {
|
||
|
FacebookId string `json:"facebook_id,omitempty"`
|
||
|
Instagram string `json:"instagram,omitempty"`
|
||
|
Twitter string `json:"twitter,omitempty"`
|
||
|
}
|
||
|
|
||
|
type Stats4sqPlaces struct {
|
||
|
TotalPhotos int64 `json:"total_photos,omitempty"`
|
||
|
TotalRatings int64 `json:"total_ratings,omitempty"`
|
||
|
TotalTips int64 `json:"total_tips,omitempty"`
|
||
|
}
|
||
|
|
||
|
type Tips4sqPlaces struct {
|
||
|
Id string `json:"id,omitempty"`
|
||
|
CreatedAt CustomTime `json:"created_at,omitempty"`
|
||
|
Text string `json:"text,omitempty"`
|
||
|
Url string `json:"url,omitempty"`
|
||
|
Lang string `json:"lang,omitempty"`
|
||
|
AgreeCount int64 `json:"agree_count,omitempty"`
|
||
|
DisagreeCount int64 `json:"disagree_count,omitempty"`
|
||
|
}
|