Class: Foursquare::UserProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/foursquare/user_proxy.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(foursquare) ⇒ UserProxy

Returns a new instance of UserProxy.



3
4
5
# File 'lib/foursquare/user_proxy.rb', line 3

def initialize(foursquare)
  @foursquare = foursquare
end

Class Method Details

.search(foursquare, options = {}) ⇒ Object



7
8
9
# File 'lib/foursquare/user_proxy.rb', line 7

def self.search(foursquare, options={})
  
end

Instance Method Details

#find(id) ⇒ Object



11
12
13
# File 'lib/foursquare/user_proxy.rb', line 11

def find(id)
  Foursquare::User.new(@foursquare, @foursquare.get("users/#{id}")["user"])
end

#search(options = {}) ⇒ Object



15
16
17
18
19
# File 'lib/foursquare/user_proxy.rb', line 15

def search(options={})
  @foursquare.get("users/search", options)["results"].map do |json|
    Foursquare::User.new(@foursquare, json)
  end
end