module Skittles::Client::List

Define methods related to lists. @see developer.foursquare.com/docs/lists/lists.html

Public Instance Methods

add_list(name, options = {}) click to toggle source
# File lib/skittles/client/list.rb, line 6
def add_list(name, options = {})
  post("lists/add", { :name => name }.merge(options)).list
end
list(id) click to toggle source

Gives detail about a list.

@param id [String] The id of the list to retrieve additional information for. @return [Hashie::Mash] A list object. @requires_acting_user No @see developer.foursquare.com/docs/lists/lists.html

# File lib/skittles/client/list.rb, line 16
def list(id)
  get("lists/#{id}").list
end
list_followers(id) click to toggle source

Returns users following this list.

@note Only valid on user-created lists. @param id [String] The id of the user created list to retrieve additional information for. @return [Hashie::Mash] A pageable list of compact user. @requires_acting_user Yes @see developer.foursquare.com/docs/lists/followers.html

# File lib/skittles/client/list.rb, line 27
def list_followers(id)
  get("lists/#{id}/followers").followers
end
list_suggestphoto(list_id, item_id) click to toggle source

Suggests photos that may be appropriate for this item.

@note Only valid on user-created lists. @param list_id [String] The id of the user created list to retrieve additional information for. @param item_id [String] The id of the item to retrieve for a list. @return [Hashie::Mash] Returns groups user and others containing lists of photos. @requires_acting_user Yes @see developer.foursquare.com/docs/lists/suggestphoto.html

# File lib/skittles/client/list.rb, line 50
def list_suggestphoto(list_id, item_id)
  get("lists/#{list_id}/suggestphoto", { :item_id => item_id }).photos
end
list_suggesttip(list_id, item_id) click to toggle source

Suggests tips that may be appropriate for this item.

@note Only valid on user-created lists. @param list_id [String] The id of the user created list to retrieve additional information for. @param item_id [String] The id of the item to retrieve for a list. @return [Hashie::Mash] Returns groups user and others containing lists of photos. @requires_acting_user Yes @see developer.foursquare.com/docs/lists/suggesttip.html

# File lib/skittles/client/list.rb, line 62
def list_suggesttip(list_id, item_id)
  get("lists/#{list_id}/suggesttip", { :item_id => item_id }).tips
end
list_suggestvenues(id) click to toggle source

Suggests venues that may be appropriate for this list.

@note Only valid on user-created lists. @param id [String] The id of the user created list to retrieve additional information for. @return [Hashie::Mash] An array of compact venues. @requires_acting_user Yes @see developer.foursquare.com/docs/lists/suggestvenues.html

# File lib/skittles/client/list.rb, line 38
def list_suggestvenues(id)
  get("lists/#{id}/suggestvenues").suggestedVenues
end