Documentation
¶
Overview ¶
Package foursquarego provides a Client for the Foursquare API.
Here are some example requests
// You will need an http client to make all the requests. httpClient := http.DefaultClient // When creating the client you can specify either clientSecret or the accesstoken client := foursquarego.NewClient(httpClient, "foursquare", "clientId", "clientSecret", "") // Venue Details venue, resp, err := client.Venues.Details("57d1efb5498e018d15de8ba3") // Search Venues venues, resp, err := client.Venues.Search(&VenueSearchParams{ LatLong: "40.7,-74", Query: "singlecut", Intent: IntentBrowse, })
There is a parameters struct if there is more than just 1 parameter. If there are strict options for the parameters then there will be a struct as seen in the search above.
For Authentication the just send either the Client Secret or the users's Access Token. If you send both to the client it will send both to foursquare. Foursquare expects that if you're making a request for a user you will send the Access Token. More information can be found on their auth page, https://developer.foursquare.com/docs/api/configuration/authentication
Index ¶
- Constants
- type APIError
- type Attribute
- type AttributeItem
- type Attributes
- type BeenHere
- type BoolAsAnInt
- type Category
- type Client
- type Color
- type Colors
- type Contact
- type Count
- type Entitie
- type Entries
- type Entry
- type Event
- type Events
- type ExploreSection
- type ExploreTime
- type Filter
- type FriendVisit
- type FriendVisitItem
- type FriendVisits
- type FullMenu
- type Group
- type HereNow
- type HereNowGroup
- type Hours
- type HoursOpen
- type HoursResp
- type HoursTimeFrame
- type ID
- type Icon
- type Inbox
- type LabeledLatLngs
- type LatLong
- type LikeGroup
- type Likes
- type LikesResp
- type Link
- type Links
- type List
- type ListGroup
- type ListItem
- type ListItems
- type Listed
- type ListedGroup
- type Lists
- type Location
- type Menu
- type MenuProvider
- type MenuResp
- type Menus
- type Meta
- type MiniVenue
- type Notification
- type Novelty
- type Omitted
- type Open
- type Page
- type PageUpdates
- type Photo
- type PhotoGroup
- type PhotoGrouping
- type PhotoSource
- type Photos
- type Phrase
- type Price
- type Provider
- type RateLimit
- type Reason
- type ReasonObject
- type ReasonObjectTarget
- type ReasonTarget
- type Reasons
- type Recommend
- type Recommendation
- type Response
- type Sample
- type SearchIntent
- type Stats
- type SubEntries
- type SubEntry
- type SuggestedBounds
- type SuggestedFilters
- type TimeFrame
- type Tip
- type TipGroup
- type TipSort
- type Tips
- type User
- type Venue
- type VenueExploreParams
- type VenueExploreResp
- type VenueHoursResp
- type VenueListedParams
- type VenuePhotosParams
- type VenueSearchParams
- type VenueService
- func (s *VenueService) Categories() ([]Category, *http.Response, error)
- func (s *VenueService) Details(id string) (*Venue, *http.Response, error)
- func (s *VenueService) Events(id string) (*Events, *http.Response, error)
- func (s *VenueService) Explore(params *VenueExploreParams) (*VenueExploreResp, *http.Response, error)
- func (s *VenueService) Hours(id string) (*VenueHoursResp, *http.Response, error)
- func (s *VenueService) Likes(id string) (*LikesResp, *http.Response, error)
- func (s *VenueService) Links(id string) (*Links, *http.Response, error)
- func (s *VenueService) Listed(params *VenueListedParams) (*Listed, *http.Response, error)
- func (s *VenueService) Menu(id string) (*MenuResp, *http.Response, error)
- func (s *VenueService) NextVenues(id string) ([]Venue, *http.Response, error)
- func (s *VenueService) Photos(params *VenuePhotosParams) (*PhotoGrouping, *http.Response, error)
- func (s *VenueService) Search(params *VenueSearchParams) ([]Venue, *http.Response, error)
- func (s *VenueService) SetHeader(key, value string) *VenueService
- func (s *VenueService) SuggestCompletion(params *VenueSuggestParams) ([]MiniVenue, *http.Response, error)
- func (s *VenueService) Tips(params *VenueTipsParams) ([]Tip, *http.Response, error)
- func (s *VenueService) Trending(params *VenueTrendingParams) ([]Venue, *http.Response, error)
- type VenueSuggestParams
- type VenueTipsParams
- type VenueTrendingParams
- type Warning
Constants ¶
const (
True = BoolAsAnInt(1)
)
Option available for BoolAsAnInt
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APIError struct {
Meta Meta `json:"meta"`
}
APIError is a foursquare error response https://developer.foursquare.com/docs/api/troubleshooting/errors
type Attribute ¶
type Attribute struct { Group Summary string `json:"summary"` Items []AttributeItem `json:"Items"` }
Attribute contains info about Venue such as price tier, reservations and parking.
type AttributeItem ¶
type AttributeItem struct { DisplayName string `json:"displayName"` DisplayValue string `json:"displayValue"` PriceTier int `json:"priceTier"` }
AttributeItem is the actual value shown in an Attribute.
type Attributes ¶
type Attributes struct {
Groups []Attribute `json:"groups"`
}
Attributes contains Attribute associated with a venue.
type BeenHere ¶
type BeenHere struct { Count int `json:"count"` UnconfirmedCount int `json:"unconfirmedCount"` Marked bool `json:"marked"` LastVisitedAt int64 `json:"lastVisitedAt"` LastCheckinExpiredAt int64 `json:"lastCheckinExpiredAt"` }
BeenHere contains the number of times the acting user has been to the venue. Absent if there is no acting user.
type BoolAsAnInt ¶
type BoolAsAnInt int
BoolAsAnInt is a bool that needs to be an int when transferred to an endpoint
type Category ¶
type Category struct { ID string `json:"id"` Name string `json:"name"` PluralName string `json:"pluralName"` ShortName string `json:"shortName"` Icon Icon `json:"icon"` Primary bool `json:"primary"` Categories []Category `json:"categories,omitempty"` }
Category is a category applied to a venue https://developer.foursquare.com/docs/api/venues/categories
type Client ¶
type Client struct { // Services used for talking to different parts of the API Venues *VenueService // contains filtered or unexported fields }
Client is a Foursquare client for making Foursquare API requests.
type Colors ¶
type Colors struct { HighlightedColor Color `json:"highlightColor"` HighlightedTextColor Color `json:"highlightTextColor"` AlgoVersion int `json:"algoVersion"` }
Colors is undocumented
type Contact ¶
type Contact struct { Phone string `json:"phone"` FormattedPhone string `json:"formattedPhone"` Twitter string `json:"twitter"` Facebook string `json:"facebook"` FacebookUsername string `json:"facebookUsername"` Instagram string `json:"instagram"` }
Contact are details to contact this venue. Can contain all or none.
type Count ¶
type Count struct {
Count int `json:"count"`
}
Count is a simple struct with just a count. Followers and todo are examples that only have a count.
type Entry ¶
type Entry struct { SectionID string `json:"sectionId"` Name string `json:"name"` Entries SubEntries `json:"entries"` }
Entry are the Items on a Entries.
type Event ¶
type Event struct { ID string `json:"id"` Name string `json:"name"` Categories []Category `json:"categories"` HereNow HereNow `json:"hereNow"` AllDay bool `json:"allDay"` StartAt int64 `json:"startAt"` EndAt int64 `json:"endAt"` Date int64 `json:"date"` TimeZone string `json:"timeZone"` Stats Stats `json:"stats"` URL string `json:"url"` }
Event is the Items in Events.
type Events ¶
type Events struct { Count int `json:"count"` Summary string `json:"summary"` Items []Event `json:"items"` }
Events is part of the respon for VenueService.Events
type ExploreSection ¶
type ExploreSection string
ExploreSection are the section options on VenueService.Explore
const ( SectionFood ExploreSection = "food" SectionDrink ExploreSection = "drink" SectionCoffee ExploreSection = "coffee" SectionShops ExploreSection = "shops" SectionArts ExploreSection = "arts" SectionOutdoors ExploreSection = "outdoors" SectionSights ExploreSection = "sights" SectionTrending ExploreSection = "trending" SectionSpecials ExploreSection = "specials" SectionNextVenues ExploreSection = "nextVenues" SectionTopPicks ExploreSection = "topPicks" )
Options for ExploreSection
type ExploreTime ¶
type ExploreTime string
ExploreTime are the time options on VenueService.Explore
const (
TimeAny ExploreTime = "any"
)
Options for ExploreTime
type FriendVisit ¶
type FriendVisit string
FriendVisit are the friendVisit options on VenueService.Explore
const ( FriendVisited FriendVisit = "visited" FriendNotVisited FriendVisit = "notvisited" )
Options for FriendVisit
type FriendVisitItem ¶
type FriendVisitItem struct { VisitedCount int `json:"visitedCount"` Liked bool `json:"liked"` Disliked bool `json:"disliked"` Oked bool `json:"oked"` User User `json:"user"` }
FriendVisitItem contains the user that visited along with information about their interaction with the venue.
type FriendVisits ¶
type FriendVisits struct { Count int `json:"count"` Summary string `json:"summary"` Items []FriendVisitItem `json:"items"` }
FriendVisits contains if an authed user's friends visited, includes self visits.
type FullMenu ¶
type FullMenu struct { MenuID string `json:"menuId"` Name string `json:"name"` Description string `json:"description"` Entries Entries `json:"entries"` }
FullMenu are the items on a Menu.
type HereNow ¶
type HereNow struct { Count int `json:"count"` Summary string `json:"summary"` Groups []HereNowGroup `json:"Groups"` }
HereNow contains which users are here now.
type HereNowGroup ¶
HereNowGroup is the groups item in HereNow.
type Hours ¶
type Hours struct { Status string `json:"status"` IsOpen bool `json:"isOpen"` IsLocalHoliday bool `json:"isLocalHoliday"` Timeframes []TimeFrame `json:"timeframes"` }
Hours contains hours during the week when a venue is open. Used in Venue struct.
type HoursOpen ¶
HoursOpen contains the start time and end time when the HoursTimeFrame is open. Used only in HoursTimeFrame
type HoursResp ¶
type HoursResp struct {
TimeFrames []HoursTimeFrame `json:"timeframes"`
}
HoursResp is an struct inside the VenueHoursResp
type HoursTimeFrame ¶
type HoursTimeFrame struct { Days []int `json:"days"` IncludesToday bool `json:"includesToday"` Open []HoursOpen `json:"open"` }
HoursTimeFrame is specific to the hours endpoint it switches the Days from a string to an array. https://developer.foursquare.com/docs/api/venues/hours
type ID ¶
type ID struct {
ID string `json:"id"`
}
ID is a simple struct with just an id. VenuePage is an example.
type LabeledLatLngs ¶
type LabeledLatLngs struct { Label string `json:"label"` Lat float64 `json:"lat"` Lng float64 `json:"lng"` }
LabeledLatLngs is further details in the Location of a venue.
type Likes ¶
type Likes struct { Count int `json:"count"` Groups []LikeGroup `json:"groups"` Summary string `json:"summary"` }
Likes is a count of users who liked the venue and groups containing users who liked it (friends and others).
type LikesResp ¶
type LikesResp struct { Count int `json:"count"` Summary string `json:"summary"` Items []User `json:"items"` Like bool `json:"like"` }
LikesResp is the response for the venue likes endpoint
type Link ¶
type Link struct { Provider Provider `json:"provider"` LinkedID string `json:"linkedId"` URL string `json:"url"` }
Link is part of the response for the venues link endpoint https://developer.foursquare.com/docs/api/venues/links
type List ¶
type List struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Type string `json:"type"` User User `json:"user"` Editable bool `json:"editable"` Public bool `json:"public"` Collaborative bool `json:"collaborative"` URL string `json:"url"` CanonicalURL string `json:"canonicalUrl"` CreatedAt int `json:"createdAt"` UpdatedAt int `json:"updatedAt"` Photo Photo `json:"photo"` LogView bool `json:"logView"` GuideType string `json:"guideType"` Guide bool `json:"guide"` Followers Count `json:"followers"` ListItems ListItems `json:"listItems"` }
List is a foursquare list. https://developer.foursquare.com/docs/api/lists/details
type ListItem ¶
type ListItem struct { ID string `json:"id"` CreatedAt int `json:"createdAt"` Tip Tip `json:"tip"` Photo Photo `json:"photo"` }
ListItem contains more information about a list. https://developer.foursquare.com/docs/api/lists/details
type ListedGroup ¶
type ListedGroup string
ListedGroup are the group options on VenueService.Listed
const (
GroupListedOther ListedGroup = "other"
)
Options for a ListedGroup
type Location ¶
type Location struct { Address string `json:"address"` CrossStreet string `json:"crossStreet"` Lat float64 `json:"lat"` Lng float64 `json:"lng"` LabeledLatLngs []LabeledLatLngs `json:"labeledLatLngs"` PostalCode string `json:"postalCode"` Cc string `json:"cc"` Neighborhood string `json:"neighborhood"` City string `json:"city"` State string `json:"state"` Country string `json:"country"` FormattedAddress []string `json:"formattedAddress"` IsFuzzed bool `json:"isFuzzed,omitempty"` Distance int `json:"distance,omitempty"` }
Location is a location for the venue. Can contain all or none and some venues have a hidden location.
type Menu ¶
type Menu struct { Type string `json:"type"` Label string `json:"label"` Anchor string `json:"anchor"` URL string `json:"url"` MobileURL string `json:"mobileUrl"` }
Menu contains how to access the menu for the venue.
type MenuProvider ¶
type MenuProvider struct { Name string `json:"name"` AttributionImage string `json:"attributionImage"` AttributionLink string `json:"attributionLink"` AttributionText string `json:"attributionText"` }
MenuProvider is the Provider for the MenuResp.
type MenuResp ¶
type MenuResp struct { Provider MenuProvider `json:"provider"` Menus Menus `json:"menus"` }
MenuResp is the response for VenueService.Menu.
type Meta ¶
type Meta struct { Code int `json:"code"` ErrorType string `json:"errorType"` ErrorDetail string `json:"errorDetail"` RequestID string `json:"requestId"` }
Meta contains request information and error details https://developer.foursquare.com/docs/api/troubleshooting/errors
type MiniVenue ¶
type MiniVenue struct { ID string `json:"id"` Name string `json:"name"` Location Location `json:"location"` Category []Category `json:"categories"` HasPerk bool `json:"hasPerk"` }
MiniVenue is a compact Venue https://developer.foursquare.com/docs/api/venues/suggestcompletion
type Notification ¶
Notification comes with all responses. https://developer.foursquare.com/docs/responses/notifications
type Omitted ¶
type Omitted interface{}
Omitted is for fields that do not have a known datastructure. If you find an example where this field is used please let me know. You will need to handle this in your application until that time.
type Open ¶
type Open struct {
RenderedTime string `json:"renderedTime"`
}
Open contains how a timeframe would be written out. Used only in TimeFrame.
type Page ¶
type Page struct {
User User `json:"user"`
}
Page (optional) contains the user that is the branded page associated with the venue.
type PageUpdates ¶
PageUpdates is on a Venue.
type Photo ¶
type Photo struct { ID string `json:"id"` CreatedAt int `json:"createdAt"` Source PhotoSource `json:"source"` Prefix string `json:"prefix"` Suffix string `json:"suffix"` Demoted bool `json:"demoted"` Width int `json:"width"` Height int `json:"height"` User User `json:"user"` Visibility string `json:"visibility"` }
Photo is a foursquare photo https://developer.foursquare.com/docs/api/photos/details
type PhotoGroup ¶
type PhotoGroup string
PhotoGroup are the group options on VenueService.Photos
const ( GroupPhotoVenue PhotoGroup = "venue" GroupPhotoCheckin PhotoGroup = "checkin" )
Options for a PhotoGroup
type PhotoGrouping ¶
PhotoGrouping is a default group with items of type photo.
type PhotoSource ¶
PhotoSource is the source on a photo struct.
type Photos ¶
type Photos struct { Count int `json:"count"` Groups []PhotoGrouping `json:"groups"` }
Photos contains a count and groups of photos for the venue.
type Phrase ¶
type Phrase struct { Phrase string `json:"phrase"` Sample Sample `json:"sample"` Count int `json:"count"` }
Phrase contains a phrase commonly seen with a venue's tips.
type Price ¶
type Price struct { Tier int `json:"tier"` Message string `json:"message"` Currency string `json:"currency"` }
Price is the price tier of a venue from 1 (least pricey) - 4 (most pricey).
type Reason ¶
type Reason struct { Summary string `json:"summary"` Type string `json:"type"` ReasonName string `json:"reasonName"` Message string `json:"message"` Target ReasonTarget `json:"target"` Count int `json:"count"` }
Reason is the items in Reasons.
type ReasonObject ¶
type ReasonObject struct { ID string `json:"id"` Type string `json:"type"` Target ReasonObjectTarget `json:"target"` Ignoreable bool `json:"ignoreable"` }
ReasonObject is Object in ReasonTarget.
type ReasonObjectTarget ¶
ReasonObjectTarget what type of target and the url for a ReasonObject.
type ReasonTarget ¶
type ReasonTarget struct { Type string `json:"type"` Object ReasonObject `json:"object"` }
ReasonTarget where the reason would be shwon for Reason.
type Recommend ¶
type Recommend struct { Reasons Reasons `json:"reasons"` Venue Venue `json:"venue"` Tips []Tip `json:"tips"` ReferralID string `json:"referralId"` }
Recommend is a recommendation with a Venue for VenueService.Explore
type Recommendation ¶
type Recommendation struct { Type string `json:"type"` Name string `json:"name"` Items []Recommend `json:"items"` }
Recommendation the groups field in VenueExploreResp
type Response ¶
type Response struct { Meta Meta `json:"meta"` Notifications []Notification `json:"notifications"` Response json.RawMessage `json:"response"` }
Response is a typical foursquare response https://developer.foursquare.com/docs/api/getting-started#6-make-your-first-api-call
type SearchIntent ¶
type SearchIntent string
SearchIntent are the intent options on VenueService.Search
const ( IntentCheckin SearchIntent = "checkin" IntentBrowse SearchIntent = "browse" IntentGlobal SearchIntent = "global" IntentMatch SearchIntent = "match" )
Options for SearchIntent
type Stats ¶
type Stats struct { CheckinsCount int `json:"checkinsCount"` UsersCount int `json:"usersCount"` TipCount int `json:"tipCount"` VisitsCount int `json:"visitsCount"` }
Stats are the stats for a venue.
type SubEntries ¶
SubEntries are the Entries on an Entry
type SubEntry ¶
type SubEntry struct { EntryID string `json:"entryId"` Name string `json:"name"` Description string `json:"description"` Prices []string `json:"prices"` Price string `json:"price"` Options Omitted `json:"options"` Additions Omitted `json:"additions"` }
SubEntry are the Items on a SubEntry
type SuggestedBounds ¶
SuggestedBounds are the bounds that were used in the search
type SuggestedFilters ¶
SuggestedFilters are filters to show the user
type TimeFrame ¶
type TimeFrame struct { Days string `json:"days"` IncludesToday bool `json:"includesToday"` Open []Open `json:"open"` Segments Omitted `json:"Segments"` }
TimeFrame shows when a venue is open.
type Tip ¶
type Tip struct { ID string `json:"id"` CreatedAt int `json:"createdAt"` Text string `json:"text"` Type string `json:"type"` URL string `json:"url"` CanonicalURL string `json:"canonicalurl"` Photo Photo `json:"photo"` PhotoURL string `json:"photoUrl"` Flags Omitted `json:"flags"` Likes Likes `json:"likes"` Like bool `json:"like"` LogView bool `json:"logView"` Listed Lists `json:"listed"` AgreeCount int `json:"agreeCount"` DisagreeCount int `json:"disagreeCount"` Todo Count `json:"todo"` User User `json:"user"` AuthorInteractionType string `json:"authorInteractionType"` }
Tip is a foursquare tip on a venue.
type User ¶
type User struct { ID string `json:"id"` FirstName string `json:"firstName"` LastName string `json:"lastName"` Gender string `json:"gender"` Relationship string `json:"relationship"` Photo *Photo `json:"photo"` Type string `json:"type"` Venue ID `json:"venue"` Tips Count `json:"tips"` Lists Lists `json:"lists"` HomeCity string `json:"homeCity"` Bio string `json:"bio"` Contact Contact `json:"contact"` }
User is a foursquare user https://developer.foursquare.com/docs/api/users/details
type Venue ¶
type Venue struct { ID string `json:"id"` Name string `json:"name"` Contact Contact `json:"contact"` Location Location `json:"location"` CanonicalURL string `json:"canonicalUrl"` Categories []Category `json:"categories"` Verified bool `json:"verified"` Stats Stats `json:"stats"` URL string `json:"url"` Price Price `json:"price"` HasMenu bool `json:"hasMenu"` Likes Likes `json:"likes"` Like bool `json:"like"` Dislike bool `json:"dislike"` Ok bool `json:"ok"` Rating float64 `json:"rating"` RatingColor string `json:"ratingColor"` RatingSignals int `json:"ratingSignals"` Menu Menu `json:"menu"` AllowMenuURLEdit bool `json:"allowMenuUrlEdit"` FriendVisits FriendVisits `json:"friendVisits"` BeenHere BeenHere `json:"beenHere"` Specials Omitted `json:"Specials"` Photos Photos `json:"photos"` VenuePage ID `json:"venuePage"` Reasons Reasons `json:"reasons"` Description string `json:"description"` StoreID string `json:"storeId"` Page Page `json:"page"` HereNow HereNow `json:"hereNow"` CreatedAt int64 `json:"createdAt"` Tips Tips `json:"tips"` ShortURL string `json:"shortUrl"` TimeZone string `json:"timeZone"` Listed Listed `json:"listed"` Phrases []Phrase `json:"phrases"` Hours Hours `json:"hours"` Popular Hours `json:"popular"` PageUpates PageUpdates `json:"pageUpdates"` Inbox Inbox `json:"inbox"` ReferralID string `json:"referralId"` VenueChains Omitted `json:"venueChains"` HasPerk bool `json:"hasPerk"` Attributes Attributes `json:"attributes"` BestPhoto Photo `json:"bestPhoto"` Colors Colors `json:"colors"` }
Venue represents a foursquare Venue. https://developer.foursquare.com/docs/api/venues/details
type VenueExploreParams ¶
type VenueExploreParams struct { LatLong string `url:"ll,omitempty"` Near string `url:"near,omitempty"` LatLongAccuracy int `url:"llAcc,omitempty"` Altitude int `url:"alt,omitempty"` AltitudeAccuracy int `url:"altAcc,omitempty"` Radius int `url:"radius,omitempty"` Section ExploreSection `url:"section,omitempty"` Query string `url:"query,omitempty"` Limit int `url:"limit,omitempty"` Offset int `url:"offset,omitempty"` Novelty Novelty `url:"novelty,omitempty"` FriendVisits FriendVisit `url:"friendVists,omitempty"` Time ExploreTime `url:"time,omitempty"` Day ExploreTime `url:"day,omitempty"` VenuePhotos BoolAsAnInt `url:"venuePhotos,omitempty"` LastVenue string `url:"lastVenue,omitempty"` OpenNow BoolAsAnInt `url:"openNow,omitempty"` SortByDistance BoolAsAnInt `url:"sortByDistance,omitempty"` Price []int `url:"price,omitempty"` Saved BoolAsAnInt `url:"saved,omitempty"` Specials BoolAsAnInt `url:"specials,omitempty"` }
VenueExploreParams are the parameters for VenueService.Explore
type VenueExploreResp ¶
type VenueExploreResp struct { SuggestedFilters SuggestedFilters `json:"suggestedFilters"` Warning Warning `json:"warning"` SuggestedRadius int `json:"suggestedRadius"` HeaderLocation string `json:"headerLocation"` HeaderFullLocation string `json:"headerFullLocation"` HeaderLocationGranularity string `json:"headerLocationGranularity"` TotalResults int `json:"totalResults"` SuggestedBounds SuggestedBounds `json:"suggestedBounds"` Groups []Recommendation `json:"groups"` }
VenueExploreResp is the response for VenueService.Explore https://developer.foursquare.com/docs/api/venues/explore
type VenueHoursResp ¶
VenueHoursResp is the response for the venue hours endpoint
type VenueListedParams ¶
type VenueListedParams struct { VenueID string `url:"-"` Group ListedGroup `url:"group,omitempty"` Limit int `url:"limit,omitempty"` Offset int `url:"offset,omitempty"` }
VenueListedParams are the parameters for VenueService.Listed
type VenuePhotosParams ¶
type VenuePhotosParams struct { VenueID string `url:"-"` Group PhotoGroup `url:"group,omitempty"` Limit int `url:"limit,omitempty"` Offset int `url:"offset,omitempty"` }
VenuePhotosParams are the paremeters for the VenueService.Photos
type VenueSearchParams ¶
type VenueSearchParams struct { LatLong string `url:"ll,omitempty"` Near string `url:"near,omitempty"` LatLongAccuracy int `url:"llAcc,omitempty"` Altitude int `url:"alt,omitempty"` AltitudeAccuracy int `url:"altAcc,omitempty"` Query string `url:"query,omitempty"` Limit int `url:"limit,omitempty"` Intent SearchIntent `url:"intent,omitempty"` Radius int `url:"radius,omitempty"` Sw string `url:"sw,omitempty"` Ne string `url:"ne,omitempty"` CategoryID []string `url:"categoryId,omitempty"` URL string `url:"url,omitempty"` ProviderID string `url:"providerId,omitempty"` LinkedID int `url:"linkedId,omitempty"` }
VenueSearchParams are the parameters for the VenueService.Search
type VenueService ¶
type VenueService struct {
// contains filtered or unexported fields
}
VenueService provies a method for accessing Foursquare venue endpoints
func (*VenueService) Categories ¶
func (s *VenueService) Categories() ([]Category, *http.Response, error)
Categories returns a hierarchical list of categories applied to venues. https://developer.foursquare.com/docs/api/venues/categories
func (*VenueService) Details ¶
Details gets all the data for a venue https://developer.foursquare.com/docs/api/venues/details
func (*VenueService) Events ¶
Events are music and movie events at this venue https://developer.foursquare.com/docs/api/venues/events
func (*VenueService) Explore ¶
func (s *VenueService) Explore(params *VenueExploreParams) (*VenueExploreResp, *http.Response, error)
Explore returns a list of recommended venues near the current location. https://developer.foursquare.com/docs/api/venues/explore
func (*VenueService) Hours ¶
func (s *VenueService) Hours(id string) (*VenueHoursResp, *http.Response, error)
Hours Returns hours for a venue. https://developer.foursquare.com/docs/api/venues/hours
func (*VenueService) Likes ¶
Likes returns friends and a total count of users who have liked this venue. https://developer.foursquare.com/docs/api/venues/likes
func (*VenueService) Links ¶
Links returns URLs or identifies from third parties for this venue https://developer.foursquare.com/docs/api/venues/links
func (*VenueService) Listed ¶
func (s *VenueService) Listed(params *VenueListedParams) (*Listed, *http.Response, error)
Listed returns the lists that this venue appears on https://developer.foursquare.com/docs/api/venues/listed
func (*VenueService) Menu ¶
Menu returns menu information for a venue. https://developer.foursquare.com/docs/api/venues/menu
func (*VenueService) NextVenues ¶
NextVenues returns venues that are checked into after the given one https://developer.foursquare.com/docs/api/venues/nextvenues
func (*VenueService) Photos ¶
func (s *VenueService) Photos(params *VenuePhotosParams) (*PhotoGrouping, *http.Response, error)
Photos gets photos for a venue https://developer.foursquare.com/docs/api/venues/photos
func (*VenueService) Search ¶
func (s *VenueService) Search(params *VenueSearchParams) ([]Venue, *http.Response, error)
Search returns a list of venues near the current location, optionally matching a search term. https://developer.foursquare.com/docs/api/venues/search
func (*VenueService) SetHeader ¶
func (s *VenueService) SetHeader(key, value string) *VenueService
SetHeader sets a header to be sent with the request for internationalization https://developer.foursquare.com/docs/api/configuration/versioning
func (*VenueService) SuggestCompletion ¶
func (s *VenueService) SuggestCompletion(params *VenueSuggestParams) ([]MiniVenue, *http.Response, error)
SuggestCompletion returns a list of mini-venues partially matching the search term, near the location. https://developer.foursquare.com/docs/api/venues/suggestcompletion
func (*VenueService) Tips ¶
func (s *VenueService) Tips(params *VenueTipsParams) ([]Tip, *http.Response, error)
Tips returns tips for a venue. https://developer.foursquare.com/docs/api/venues/tips
func (*VenueService) Trending ¶
func (s *VenueService) Trending(params *VenueTrendingParams) ([]Venue, *http.Response, error)
Trending returns a list of venues near the current location with the most people currently checked in. https://developer.foursquare.com/docs/api/venues/trending
type VenueSuggestParams ¶
type VenueSuggestParams struct { LatLong string `url:"ll,omitempty"` Near string `url:"near,omitempty"` LatLongAccuracy int `url:"llAcc,omitempty"` Altitude int `url:"alt,omitempty"` AltitudeAccuracy int `url:"altAcc,omitempty"` Query string `url:"query,omitempty"` Limit int `url:"limit,omitempty"` Radius int `url:"radius,omitempty"` Sw string `url:"sw,omitempty"` Ne string `url:"ne,omitempty"` }
VenueSuggestParams are the parementers for the VenueService.SuggestCompletion
type VenueTipsParams ¶
type VenueTipsParams struct { VenueID string `url:"-"` Sort TipSort `url:"sort,omitempty"` Limit int `url:"limit,omitempty"` Offset int `url:"offset,omitempty"` }
VenueTipsParams are the parameters for VenueService.Tips
type VenueTrendingParams ¶
type VenueTrendingParams struct { LatLong string `url:"ll,omitempty"` Limit int `url:"limit,omitempty"` Radius int `url:"radius,omitempty"` }
VenueTrendingParams are the parameters for VenueService.Trending