module Decathlon::Sports::Recommendations
Public Class Methods
get(id)
click to toggle source
# File lib/decathlon/sports/recommendation.rb, line 7 def self.get(id) response = Faraday.get("#{API_URL}/sports/#{id}/recommendations") JSON.parse(response.body) end
location(coordinates, source = 'popular', limit = 10)
click to toggle source
# File lib/decathlon/sports/recommendation.rb, line 12 def self.location(coordinates, source = 'popular', limit = 10) response = Faraday.get("#{API_URL}/sports/recommendations?coordinates=#{coordinates[:lon]},#{coordinates[:lat]}&source=#{source}&count=#{limit}") JSON.parse(response.body) end