Skip to content

Instantly share code, notes, and snippets.

@pdarche
Last active December 10, 2015 01:38
Show Gist options
  • Save pdarche/4360588 to your computer and use it in GitHub Desktop.
Save pdarche/4360588 to your computer and use it in GitHub Desktop.
When I run the code block locally I get the proper response. When I run on my remote server, I get a timestamp error.
require 'fitgem'
client = Fitgem::Client.new( {
:consumer_key => 'consumer_key',
:consumer_secret => 'consumer_secret',
:token =>'access_token',
:secret => 'access_secret'
} )
client.activities_on_date('today')
#local resonse: {"activities"=>[], "goals"=>{"floors"=>10, "caloriesOut"=>2184, "distance"=>5, "activeScore"=>1000, "steps"=>10000}, "summary"=>{"floors"=>0, "caloriesOut"=>1009, "sedentaryMinutes"=>842, "lightlyActiveMinutes"=>13, "veryActiveMinutes"=>0, "elevation"=>0, "fairlyActiveMinutes"=>2, "distances"=>[{"activity"=>"total", "distance"=>0.04}, {"activity"=>"tracker", "distance"=>0.04}, {"activity"=>"loggedActivities", "distance"=>0}, {"activity"=>"veryActive", "distance"=>0}, {"activity"=>"moderatelyActive", "distance"=>0.01}, {"activity"=>"lightlyActive", "distance"=>0.03}, {"activity"=>"sedentaryActive", "distance"=>0}], "activeScore"=>28, "steps"=>84, "marginalCalories"=>25, "activityCalories"=>46}}
#remote response : {"errors"=>[{"errorType"=>"oauth", "fieldName"=>"oauth_timestamp", "message"=>"oauth_acceptable_timestamps=1356203678-1356204278"}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment