Class: Foursquare::Venue

Inherits:
Node
  • Object
show all
Defined in:
lib/foursquare_venue.rb

Instance Method Summary collapse

Methods inherited from Node

#initialize, #perform_graph_request

Constructor Details

This class inherits a constructor from Foursquare::Node

Instance Method Details

#add(params = {}) ⇒ Object

Venues



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/foursquare_venue.rb', line 4

def add(params={})
  params = {:name => "",
            :address => "",
            :crossStreet => "",
            :city=>"San Francisco",
            :state=>"California",
            :zip=>"94108",
            :phone=>"",
            :ll => "37.792694,-122.409325",
            :primaryCategoryId => "4bf58dd8d48988d1e1931735"}.merge!(params)

  perform_graph_request("venues/add", params, "post")
end

#categoriesObject



18
19
20
# File 'lib/foursquare_venue.rb', line 18

def categories
  perform_graph_request("venues/categories", {})
end

#flag(venue_id, params = {}) ⇒ Object



51
52
53
54
55
# File 'lib/foursquare_venue.rb', line 51

def flag(venue_id, params={})
  params = {:problem => "mislocated"}.merge!(params)

  perform_graph_request("venues/#{venue_id}/flag", params, "post")
end

#herenow(venue_id) ⇒ Object

Aspects



35
36
37
# File 'lib/foursquare_venue.rb', line 35

def herenow(venue_id)
  perform_graph_request("venues/#{venue_id}/herenow", {})
end

#marktodo(venue_id, params = {}) ⇒ Object

marktodo



45
46
47
48
49
# File 'lib/foursquare_venue.rb', line 45

def marktodo(venue_id, params={})
  params = {:text => ""}.merge!(params)

  perform_graph_request("venues/#{venue_id}/marktodo", params, "post")
end

#proposeedit(venue_id, params = {}) ⇒ Object



57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/foursquare_venue.rb', line 57

def proposeedit(venue_id, params={})
  params = {:name => "",
            :address => "",
            :crossStreet => "",
            :city=>"San Francisco",
            :state=>"California",
            :zip=>"94108",
            :phone=>"",
            :ll => "37.792694,-122.409325",
            :primaryCategoryId => "4bf58dd8d48988d1e1931735"}.merge!(params)

  perform_graph_request("venues/#{venue_id}/proposeedit", params, "post")
end

#search(params = {}) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
# File 'lib/foursquare_venue.rb', line 22

def search(params={})
  params = {:ll => "37.792694,-122.409325",
            :llAcc => "100",
            :alt => "0",
            :altAcc=>"100",
            :query=>"",
            :limit=>"50",
            :intent=>"checkin"}.merge!(params)

  perform_graph_request("venues/search", params)
end

#tips(venue_id, params = {:sort => "recent"}) ⇒ Object

sort = recent or popular



40
41
42
# File 'lib/foursquare_venue.rb', line 40

def tips(venue_id, params={:sort => "recent"})
  perform_graph_request("venues/#{venue_id}/tips", {})
end