Class: Foursquare::UserProxy
- Inherits:
-
Object
- Object
- Foursquare::UserProxy
- Defined in:
- lib/foursquare/user_proxy.rb
Class Method Summary collapse
Instance Method Summary collapse
- #find(id) ⇒ Object
-
#initialize(foursquare) ⇒ UserProxy
constructor
A new instance of UserProxy.
- #search(options = {}) ⇒ Object
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, ={}) 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(={}) @foursquare.get("users/search", )["results"].map do |json| Foursquare::User.new(@foursquare, json) end end |