Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Foursquare ruby implementations
client = Foursquare.new(:oauthToken => "", :oauthSecret => "")
categories = client.categories()
goodCategories = []
categories.each do |category|
if category.name != "food" || category.name != "nightlife"
goodCategories.push(categoryId)
end
end
slider = getSlider()
venues = client.explore(:ll => "", :limit => 10, :intent => "browse", :radius => (48280 * slider), :section => "topPicks")
threshold = getThreshold()
venues = venues.map do |venue|
value = tanh((venue.stats.checkinsCount/venue.stats.checkinsCount) * likes)
return venue if value > threshold
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.