class NikeRb::Client
Public Class Methods
new(access_token)
click to toggle source
# File lib/nike_rb.rb, line 19 def initialize(access_token) @access_token = access_token end
Public Instance Methods
current_fuel(options={})
click to toggle source
# File lib/nike_rb.rb, line 23 def current_fuel(options={}) params = "#{API_URI}/me/sport/activities?access_token=#{@access_token}" if options[:count] params << "&count=#{options[:count]}" end response = HTTParty.get("#{params}", headers: HEADERS) body = JSON.parse response.body return body end