fitbitScraper icon indicating copy to clipboard operation
fitbitScraper copied to clipboard

get_activity_data

Open jagregory17 opened this issue 9 years ago • 4 comments

I'm having trouble pulling specific dates when using get_activity_data. It seems that no matter what dates I use it pulls the most recent two weeks.

I'm using R 3.2.3, Rstudio Version 0.99.473, on Mac OSX 10.10.3 Yosemite.

day_activites3 <- get_activity_data(cookie, start_date="2015-12-25", end_date = "2015-12-31") returns the last two weeks of data instead of the specified days. I noticed this first when I was trying to just pull data from December. I started playing with the start and end date and noticed that no matter which dates I use it always pulls the most recent two weeks. I haven't had this problem with any of the other commands. Any ideas?

jagregory17 avatar Jan 03 '16 18:01 jagregory17

I'm having the same problem. It would be great to be able to pull activity data for a longer range.

heids63 avatar Feb 02 '16 23:02 heids63

Weird issue. After messing around with it for a bit (we are using an undocumented (at least publicly) API here), it looks like "fromDate" and "toDate" do nothing at all. There is a parameter called "beforeDate" that seems to work, so we'll be able to put an upper bound on the data requested. The "afterDate" parameter doesn't seem to work either. I'll be updating the package soon. I'm sorry it's taken so long.

corynissen avatar Feb 18 '16 19:02 corynissen

finally got around to trying this.

get_activity_data(cookie, end_date = "2016-06-08") gives me this error:

Error in data.frame(id = sapply(dat_list[[2]]$result, "[[", "id"), name = sapply(dat_list[[2]]$result, : arguments imply differing number of rows: 100, 0

jagregory17 avatar Jun 16 '16 02:06 jagregory17

I get:

activity <- get_activity_data(cookie, end_date = "2016-06-02") Error in df$date : $ operator is invalid for atomic vectors

heids63 avatar Jun 16 '16 21:06 heids63