module FoursquareNext::Venuegroups

Public Instance Methods

add_venuegroup(options={}) click to toggle source

Create a venue group. If the venueId parameter is specified, then the endpoint will add the specified venues to the venue group. If it is not possible to add all of the specified venues to the group, then creation of the venue group will fail entirely. @param [Hash] options @option options String :name - Required. The name to give the group. @option options String :venueId - Comma-delimited list of venue IDs to add to the group. If this parameter is not specified, then the venue group will initially be empty.

# File lib/foursquare_next/venuegroups.rb, line 22
def add_venuegroup(options={})
  response = connection.post do |req|
    req.url "venuegroups/add", options
  end
  return_error_or_body(response, response.body.response.venueGroup)
end
delete_venuegroup(group_id, options={}) click to toggle source

Delete a venue group. param [String] group_id - The ID of the venuegroup to delete.

# File lib/foursquare_next/venuegroups.rb, line 54
def delete_venuegroup(group_id, options={})
  response = connection.post do |req|
    req.url "venuegroups/#{group_id}/delete", options
  end
  return_error_or_body(response, response.body.response)
end
list_venuegroup(options={}) click to toggle source

List all venue groups owned by the user.

# File lib/foursquare_next/venuegroups.rb, line 44
def list_venuegroup(options={})
  response = connection.get do |req|
    req.url "venuegroups/list", options
  end
  return_error_or_body(response, response.body.response.venueGroups)
end
venuegroup(group_id, options={}) click to toggle source

Retrieve information about a venuegroup

param [String] group_id The ID of the venuegroup

# File lib/foursquare_next/venuegroups.rb, line 7
def venuegroup(group_id, options={})
  response = connection.get do |req|
    req.url "venuegroups/#{group_id}", options
  end
  return_error_or_body(response, response.body.response.venueGroup)
end
venuegroup_update(group_id, options={}) click to toggle source

Updates a venue group. At least one of the name and venueId parameters must be specified. @param [String] group_id - required The ID of the venue group to modify @param [Hash] options @option options String :name - If specified, the new name to give to the group. @option options String :venueId - If specified, a comma-delimited list of venue IDs that will become the new set of venue IDs for the group.

# File lib/foursquare_next/venuegroups.rb, line 35
def venuegroup_update(group_id, options={})
  response = connection.post do |req|
    req.url "venuegroups/#{group_id}/update", options
  end
  return_error_or_body(response, response.body.response.venueGroup)
end