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

- (UserProxy) initialize(foursquare)



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

def initialize(foursquare)
  @foursquare = foursquare
end

Class Method Details

+ (Object) search(foursquare, options = {})



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

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

Instance Method Details

- (Object) find(id)



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

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

- (Object) search(options = {})



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