Documentation
¶
Index ¶
- Constants
- type ApiError
- type Attribute
- type Attributes
- type Category
- type Contact
- type Entitie
- type Entries
- type EntryItem
- type Event
- type EventsResponse
- type Followers
- type FoursquareApi
- func (a *FoursquareApi) Close()
- func (a FoursquareApi) GetCategories() (categories []Category, err error)
- func (a FoursquareApi) GetVenue(id string) (venue Venue, err error)
- func (a FoursquareApi) GetVenueEvents(id string) (events []Event, err error)
- func (a FoursquareApi) GetVenueHereNow(id string, uv url.Values) (hereNow HereNow, err error)
- func (a FoursquareApi) GetVenueHours(id string) (hours HoursResponse, err error)
- func (a FoursquareApi) GetVenueLikes(id string) (likes LikesResponse, err error)
- func (a FoursquareApi) GetVenueLinks(id string) (links LinksResponse, err error)
- func (a FoursquareApi) GetVenueListed(id string, uv url.Values) (lists Listed, err error)
- func (a FoursquareApi) GetVenueMenu(id string) (menu MenuResponse, err error)
- func (a FoursquareApi) GetVenuePhotos(id string, uv url.Values) (photos []Photo, err error)
- func (a FoursquareApi) GetVenueSimilar(id string, uv url.Values) (venues SimilarVenueResponse, err error)
- func (a FoursquareApi) Search(uv url.Values) (venues []Venue, err error)
- type HereNow
- type HereNowItem
- type Hours
- type HoursResponse
- type HoursVenue
- type Icon
- type Interaction
- type Likes
- type LikesResponse
- type Link
- type LinksResponse
- type List
- type ListGroup
- type ListItem
- type ListItems
- type Listed
- type Location
- type Menu
- type MenuResponse
- type Menus
- type Meta
- type Omit
- type Open
- type Photo
- type PhotoGroup
- type PhotoSource
- type Photos
- type PhotosResponse
- type Phrase
- type Popular
- type Price
- type Provider
- type Reason
- type Reasons
- type Sample
- type ShortMenu
- type SimilarVenueResponse
- type SpecialItem
- type Specials
- type Stats
- type TimeFrame
- type TimeFrameHours
- type Tip
- type TipGroup
- type Tips
- type User
- type UserPhoto
- type Venue
Constants ¶
View Source
const ( InvalidAuth = 401 ParamError = 400 EndPointError = 404 NotAuthorized = 403 RateLimitExceeded = 403 Depreciated = 200 )
View Source
const ( API_URL = "https://api.foursquare.com/v2/" VERSION = "20150813" MODE = "foursquare" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attributes ¶
type Attributes struct {
Groups []Attribute `json:"groups"`
}
type EventsResponse ¶
type FoursquareApi ¶
func NewFoursquareApi ¶
func NewFoursquareApi(clientID string, clientSecret string) *FoursquareApi
func (*FoursquareApi) Close ¶
func (a *FoursquareApi) Close()
func (FoursquareApi) GetCategories ¶
func (a FoursquareApi) GetCategories() (categories []Category, err error)
func (FoursquareApi) GetVenueEvents ¶
func (a FoursquareApi) GetVenueEvents(id string) (events []Event, err error)
func (FoursquareApi) GetVenueHereNow ¶
valid url.Values are: limit, offset This is reqlly a swarm endpoint
func (FoursquareApi) GetVenueHours ¶
func (a FoursquareApi) GetVenueHours(id string) (hours HoursResponse, err error)
func (FoursquareApi) GetVenueLikes ¶
func (a FoursquareApi) GetVenueLikes(id string) (likes LikesResponse, err error)
func (FoursquareApi) GetVenueLinks ¶
func (a FoursquareApi) GetVenueLinks(id string) (links LinksResponse, err error)
func (FoursquareApi) GetVenueListed ¶
valid url.Values are: group, limit, offset
func (FoursquareApi) GetVenueMenu ¶
func (a FoursquareApi) GetVenueMenu(id string) (menu MenuResponse, err error)
func (FoursquareApi) GetVenuePhotos ¶
valid url.Values are: group, limit, offset
func (FoursquareApi) GetVenueSimilar ¶
func (a FoursquareApi) GetVenueSimilar(id string, uv url.Values) (venues SimilarVenueResponse, err error)
type HereNow ¶
type HereNow struct {
Count int `json:"count"`
Summary string `json:"summary"`
Groups Omit `json:"groups,omitempty"` //TODO: take care fo this later
Items []HereNowItem `json:"items,omitempty"` // I dunno sometimes it has groups or Items
}
type HereNowItem ¶
type Hours ¶
type Hours struct {
Status string `json:"status,omitempty"`
IsOpen bool `json:"isOpen,ommitempty"`
Timeframes []TimeFrameHours `json:"timeframes,omitempty"`
}
type HoursResponse ¶
type HoursVenue ¶
type Interaction ¶
type Interaction struct {
EntryUrl string `json:"entryUrl"`
}
type LikesResponse ¶
type LinksResponse ¶
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"`
Followers Followers `json:"followers"`
ListItems []ListItems `json:"listItems"`
}
type Location ¶
type Location struct {
Address string `json:"address"`
CrossStreet string `json:"crossStreet"`
Lat float64 `json:"lat"`
Lng float64 `json:"lng"`
Distance int `json:"distance"`
PostalCode string `json:"postalCode"`
Cc string `json:"cc"`
City string `json:"city"`
State string `json:"state"`
Country string `json:"country"`
FormattedAddress string `json:"formattedAddress"`
IsFuzzed bool `json:"isFuzzed"`
}
type MenuResponse ¶
type PhotoGroup ¶
type PhotoSource ¶
type Photos ¶
type Photos struct {
Count int `json:"count"`
Groups []PhotoGroup `json:"groups"`
}
type PhotosResponse ¶
type SimilarVenueResponse ¶
type SpecialItem ¶
type SpecialItem struct {
Type string `json:"type"`
Message string `json:"message"`
Description string `json:"description"`
FinePrint string `json:"finePrint"`
Unlocked bool `json:"unlocked"`
Icon string `json:"icon"`
Title string `json:"title"`
State string `json:"state"`
Provider string `json:"provider"`
Redemption string `json:"redemption"`
Interaction Interaction `json:"interaction"`
Progress int `json:"progress"`
ProgressDescription string `json:"progressDescription"`
Detail int `json:"detail"`
Target int `json:"target"`
FriendsHere []User `json:"friendsHere"`
// contains filtered or unexported fields
}
type Specials ¶
type Specials struct {
Count int `json:"count"`
Items []SpecialItem `json:"items"`
}
type TimeFrame ¶
type TimeFrame struct {
Days string `json:"days"`
IncludesToday bool `json:"includesToday"`
Open []Open `json:"open"`
Segments Omit `json:"-"` //TODO: take care fo this later
}
This is used in the main Hours struct for the entire venu
type TimeFrameHours ¶
type TimeFrameHours struct {
Days []int `json:"days"`
IncludesToday bool `json:"includesToday"`
Open []Open `json:"open"`
Segements Omit `json:"-"`
}
This is used for the hours endpoint
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 Omit `json:"flags"` //TODO: take care fo this later
Likes Likes `json:"likes"`
Like bool `json:"like"`
LogView bool `json:"logView"`
EditedAt int `json:"editedAt"`
Todo Omit `json:"todo"` //TODO: take care fo this later
User User `json:"user"`
}
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 float32 `json:"rating"`
RatingColor string `json:"ratingColor"`
RatingSignals int `json:"ratingSignals"`
Menu ShortMenu `json:"menu"`
Specials Specials `json:"specials"`
Photos Photos `json:"photos"`
Reasons Reasons `json:"reasons"`
CreatedAt int `json:"createdAt"`
Tips Tips `json:"tips"`
Tags []string `json:"tags"`
ShortUrl string `json:"shortUrl"`
TimeZone string `json:"timeZone"`
Listed Listed `json:"listed"`
Phrases []Phrase `json:"phrases"`
Hours HoursVenue `json:"hours"`
Popular Popular `json:"popular"`
PageUpdates Omit `json:"-"`
Inbox Omit `json:"-"`
VenueChains Omit `json:"-"`
Attributes Attributes `json:"attributes"`
BestPhoto Photo `json:"bestPhoto"`
}
func (*Venue) HasCategory ¶
Click to show internal directories.
Click to hide internal directories.