module FoursquareNext::Pages
Public Instance Methods
Returns a list of managed pages.
# File lib/foursquare_next/pages.rb, line 54 def managed_pages(options = {}) response = connection.get do |req| req.url "pages/managing", options end return_error_or_body(response, response.body.response.managing) end
Get information about a page.
/!\ A page is considered by Foursquare as a user. @param [Integer] user_id - Page to get information for.
# File lib/foursquare_next/pages.rb, line 9 def page(user_id, options = {}) response = connection.get do |req| req.url "pages/#{user_id}", options end return_error_or_body(response, response.body.response.user) end
Get all venues for a given page.
@param [String] page_id - The page to retrieve venues for. @param [Hash] options @option options Integer :limit @option options Integer :offset - For paging through results @option options String :ll - Latitude and longitude in format LAT,LON - Limit results to venues near this latitude and longitude. NOT VALID with NE or SW (see after). @option String :radius - Can be used when including ll. Limit results to venues within this many meters of the specified ll. Not valid with ne or sw. @option String :sw - With ne, limits results to the bounding quadrangle defined by the latitude and longitude given by sw as its south-west corner, and ne as its north-east corner. Not valid with ll or radius. @option String :ne - See sw
# File lib/foursquare_next/pages.rb, line 41 def page_venues(page_id, options = {}) response = connection.get do |req| req.url "pages/#{page_id}/venues", options end venues = return_error_or_body(response, response.body.response.venues) venues = foursquare_next.filter(venues, options[:query]) if options.has_key? :query venues end
Search for pages.
@param [Hash] options @option options String :twitter - Match on twitter username @option options String :fbid - Match on facebook id. @option options String :name - Match on name
# File lib/foursquare_next/pages.rb, line 23 def search_pages(options = {}) response = connection.get do |req| req.url "pages/search", options end return_error_or_body(response, response.body.response) end