[med-svn] [r-cran-fitbitscraper] 05/06: Imported Upstream version 0.1.8

Dylan Aïssi bob.dybian-guest at moszumanska.debian.org
Thu Apr 20 21:46:51 UTC 2017


This is an automated email from the git hooks/post-receive script.

bob.dybian-guest pushed a commit to branch master
in repository r-cran-fitbitscraper.

commit 52b3a97a05ce10c3c0fb60f5e5cc67ac4d89992d
Author: Dylan Aïssi <bob.dybian at gmail.com>
Date:   Thu Apr 20 23:45:12 2017 +0200

    Imported Upstream version 0.1.8
---
 DESCRIPTION                          |   8 ++++----
 MD5                                  |  30 +++++++++++++++---------------
 NEWS.md                              |   6 ++++++
 R/get_activity_data.R                |  13 +------------
 R/get_daily_data.R                   |  31 ++++++++++++++++++++++++-------
 R/login.R                            |   3 +--
 README.md                            |   9 ++++++---
 build/vignette.rds                   | Bin 214 -> 214 bytes
 inst/doc/fitbitScraper-examples.html |  13 ++++++-------
 man/get_activity_data.Rd             |  13 +------------
 man/get_daily_data.Rd                |   3 +--
 man/get_intraday_data.Rd             |   1 -
 man/get_premium_export.Rd            |   1 -
 man/get_sleep_data.Rd                |   1 -
 man/get_weight_data.Rd               |   1 -
 man/login.Rd                         |   1 -
 16 files changed, 65 insertions(+), 69 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index dbc5491..ba25ef9 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
 Package: fitbitScraper
 Title: Scrapes Data from Fitbit
-Version: 0.1.7
+Version: 0.1.8
 Author: Cory Nissen <corynissen at gmail.com> [aut, cre]
 Maintainer: Cory Nissen <corynissen at gmail.com>
 Description: Scrapes data from Fitbit <http://www.fitbit.com>. This does not use the official
@@ -11,10 +11,10 @@ License: MIT + file LICENSE
 LazyData: true
 Imports: httr, stringr, jsonlite, methods, utils
 URL: https://github.com/corynissen/fitbitScraper
-RoxygenNote: 5.0.1
+RoxygenNote: 6.0.1
 Suggests: knitr, rmarkdown, ggplot2, ggthemes
 VignetteBuilder: knitr
 NeedsCompilation: no
-Packaged: 2016-05-19 12:20:00 UTC; 60018847
+Packaged: 2017-04-13 15:19:10 UTC; 60018847
 Repository: CRAN
-Date/Publication: 2016-05-19 20:31:18
+Date/Publication: 2017-04-13 22:12:40 UTC
diff --git a/MD5 b/MD5
index ed44c3b..c447179 100644
--- a/MD5
+++ b/MD5
@@ -1,24 +1,24 @@
-1316fb002b8d2000506141b342b5435d *DESCRIPTION
+ee7887a6f26ec6cbab51f3e9a55b54bf *DESCRIPTION
 d499114c8fb7674b84d73553dd6e8d9a *LICENSE
 af05ec54f552800fae2fa87191cbef9c *NAMESPACE
-6c6b1fe6226af70ba953aec1b66d5b32 *NEWS.md
-ca12202aff2a6dd5b672b54b269170fe *R/get_activity_data.R
-6f22f81c632183d6bb0d26638f2741c5 *R/get_daily_data.R
+ac61a04f6ddab4b74ed5146ba2e9e9ac *NEWS.md
+4c36988d3c86d315746c10bf66b3ca0e *R/get_activity_data.R
+5f76691fa4c46dbd92c24f360593b031 *R/get_daily_data.R
 bbdfa193a0b307c8f634c89681ad87d1 *R/get_intraday_data.R
 c1b92b4d6f2af001a7c7227c927360f4 *R/get_premium_export.R
 a363b6cd2faa8a8ccfdb2052dfb42540 *R/get_sleep_data.R
 e541d7ca220d36967d1e210f94f6ce68 *R/get_weight_data.R
-102dcc2840fa122eea731fa2f5b4b6c8 *R/login.R
-a5dfa3c770b3e2fa88f19a8788a2bfeb *README.md
-2b652519e0db5c2000f87c1fb9c79f13 *build/vignette.rds
+f4556f117ee5deccbebf783f1eb1b107 *R/login.R
+af81496badfc842745acd1abb2580651 *README.md
+0931549ad4694e9876f3910fcce3a896 *build/vignette.rds
 0834d2d5146972b7fcf319fadfbb7c37 *inst/doc/fitbitScraper-examples.R
 c7eceade09e11fbd5338f2da0b26a6d6 *inst/doc/fitbitScraper-examples.Rmd
-da9afc6a287ba001a93f404c0255615c *inst/doc/fitbitScraper-examples.html
-b4bd6aacbc1f19392f02d757e13ac0ee *man/get_activity_data.Rd
-5780a406e827724de4d3cc2b96913fd1 *man/get_daily_data.Rd
-b9312f0b0bace2795a3229bc19efeac3 *man/get_intraday_data.Rd
-0f12986e8d5ef889d56848ecdb09b4e3 *man/get_premium_export.Rd
-cf2f8c7c4abd423007bdf5db9b0abd15 *man/get_sleep_data.Rd
-dc0c871efcadc80badd75074df7629af *man/get_weight_data.Rd
-88fd5d742acc1558be0f54313b60c675 *man/login.Rd
+80dc573c8e9f9468f91ee98b67d79f36 *inst/doc/fitbitScraper-examples.html
+ef46e34905fe4de65d9720d6faf659d5 *man/get_activity_data.Rd
+2fb841c269e0c885e24c7827c14713be *man/get_daily_data.Rd
+d1d62e7f5a4203d3981365b73484047b *man/get_intraday_data.Rd
+95e7c34caf634955d90ececb5e34fddf *man/get_premium_export.Rd
+30bc88bbfe3cf9130a56cdf2c4f00620 *man/get_sleep_data.Rd
+80c17df442cb83910c7c0f512f3e535b *man/get_weight_data.Rd
+cfb2afc79b3ca5875d9898049cb6ecc0 *man/login.Rd
 c7eceade09e11fbd5338f2da0b26a6d6 *vignettes/fitbitScraper-examples.Rmd
diff --git a/NEWS.md b/NEWS.md
index 3a8707d..f5b207c 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,4 +1,10 @@
 
+### fitbitScraper 0.1.8
+* added minutesSedentary data to 'get_daily_data'  [(14)](https://github.com/corynissen/fitbitScraper/issues/14)  
+* fixed bug in the column names in 'get_daily_data' for getTimeInHeartRateZonesPerDay [(9)](https://github.com/corynissen/fitbitScraper/issues/9)   [(13)](https://github.com/corynissen/fitbitScraper/issues/13)  
+* if login returns a cookie that is character(0), throw error  [(10)](https://github.com/corynissen/fitbitScraper/issues/10)  
+
+
 ### fitbitScraper 0.1.7
 * added vignette
 
diff --git a/R/get_activity_data.R b/R/get_activity_data.R
index 055c821..2e9274a 100644
--- a/R/get_activity_data.R
+++ b/R/get_activity_data.R
@@ -5,17 +5,7 @@
 #' @param end_date Date in YYYY-MM-DD format
 #' @keywords data
 #' @export
-#' @return A dataframe with thirteen columns:
-#'  \item{id}{The fitbit ID of the activity}
-#'  \item{name}{Name for the type of activity}
-#'  \item{date}{Date of the activity}
-#'  \item{start_time}{Start time for the activity}
-#'  \item{distance}{Distance travelled during the activity}
-#'  \item{duration}{Duration in hours:minutes:seconds of the activity}
-#'  \item{calories}{Calories burned during the activity}
-#'  \item{steps}{Steps taken the activity}
-#'  \item{start_datetime}{A POSIXct encoded start time for the activity}
-#'  \item{end_datetime}{A POSIXct encoded end time for the activity}
+#' @return A dataframe with raw output from Fitbit
 #' @examples
 #' \dontrun{
 #' get_activity_data(cookie, end_date="2015-01-20")
@@ -60,6 +50,5 @@ get_activity_data <- function(cookie, end_date){
                                   format="%Y-%m-%d %H:%M", tz=tz)
   df$end_datetime <- as.POSIXct(paste0(df$date, " ", df$formattedEndTime),
                                   format="%Y-%m-%d %H:%M", tz=tz)
-  
   return(df)
 }
diff --git a/R/get_daily_data.R b/R/get_daily_data.R
index 964dada..36d58f3 100644
--- a/R/get_daily_data.R
+++ b/R/get_daily_data.R
@@ -2,7 +2,7 @@
 #'
 #' Get daily data from fitbit using cookie returned from login function
 #' @param cookie Cookie returned after login, specifically the "u" cookie
-#' @param what What data you wish to be returned. Options include "steps", "distance", "floors", "minutesVery", "caloriesBurnedVsIntake", "getTimeInHeartRateZonesPerDay", "getRestingHeartRateData"
+#' @param what What data you wish to be returned. Options include "steps", "distance", "floors", "minutesVery", "caloriesBurnedVsIntake", "minutesSedentary", "getTimeInHeartRateZonesPerDay", "getRestingHeartRateData"
 #' @param start_date Date in YYYY-MM-DD format
 #' @param end_date Date in YYYY-MM-DD format
 #' @keywords data
@@ -20,11 +20,19 @@ get_daily_data <- function(cookie, what="steps", start_date, end_date){
   if(!is.character(what)){stop("what must be a character string")}
   if(!is.character(start_date)){stop("start_date must be a character string")}
   if(!is.character(end_date)){stop("end_date must be a character string")}
-  if(!grepl("[0-9]{4}-[0-9]{2}-[0-9]{2}", start_date)){stop('start_date must have format "YYYY-MM-DD"')}
-  if(!grepl("[0-9]{4}-[0-9]{2}-[0-9]{2}", end_date)){stop('end_date must have format "YYYY-MM-DD"')}
-  if(!what %in% c("steps", "distance", "floors", "minutesVery", "caloriesBurnedVsIntake",
-                  "getTimeInHeartRateZonesPerDay", "getRestingHeartRateData")){
-    stop('what must be one of "steps", "distance", "floors", "minutesVery", "caloriesBurnedVsIntake", "getTimeInHeartRateZonesPerDay", "getRestingHeartRateData"')
+  if(!grepl("[0-9]{4}-[0-9]{2}-[0-9]{2}", start_date)){
+    stop('start_date must have format "YYYY-MM-DD"')
+  }
+  if(!grepl("[0-9]{4}-[0-9]{2}-[0-9]{2}", end_date)){
+    stop('end_date must have format "YYYY-MM-DD"')
+  }
+  if(!what %in% c("steps", "distance", "floors", "minutesVery", 
+                  "caloriesBurnedVsIntake", "minutesSedentary",
+                  "getTimeInHeartRateZonesPerDay", 
+                  "getRestingHeartRateData")){
+    stop('what must be one of "steps", "distance", "floors", "minutesVery", 
+         "caloriesBurnedVsIntake", "minutesSedentary", 
+         "getTimeInHeartRateZonesPerDay", "getRestingHeartRateData"')
   }
 
   if(what %in% c("getTimeInHeartRateZonesPerDay", "getRestingHeartRateData")){
@@ -56,9 +64,18 @@ get_daily_data <- function(cookie, what="steps", start_date, end_date){
   dat_list <- jsonlite::fromJSON(dat_string)
 
   if(what=="getTimeInHeartRateZonesPerDay"){
+    if(length(dat_list$value)==0){
+      stop("No getTimeInHeartRateZonesPerDay available")
+    }
     df <- cbind(dat_list$dateTime, dat_list$value, stringsAsFactors=FALSE)
-    names(df)[1:3] <- c("time", "zone1", "zone2", "zone3")
+    names(df)[1] <- "time"
+    names(df)[names(df)=="IN_DEFAULT_ZONE_1"] <- "zone1"
+    names(df)[names(df)=="IN_DEFAULT_ZONE_2"] <- "zone2"
+    names(df)[names(df)=="IN_DEFAULT_ZONE_3"] <- "zone3"
   }else if(what=="getRestingHeartRateData"){
+    if(length(dat_list$dataPoints)==0){
+      stop("No getRestingHeartRateData available")
+    }
     df <- dat_list$dataPoints
     df <- df[, c("date", "value")]
     names(df)[1:2] <- c("time", "restingHeartRate")
diff --git a/R/login.R b/R/login.R
index 36e7d76..d59d39d 100644
--- a/R/login.R
+++ b/R/login.R
@@ -38,10 +38,9 @@ login <- function(email, password, rememberMe=FALSE){
   if(is.null(cookie)){
     all_cookies <- a$cookies
     cookie <- all_cookies[grep("^u$", all_cookies$name, ignore.case=F),"value"]
-    if(is.null(cookie)){
+    if(is.null(cookie) | identical(cookie, character(0))){
       stop("login failed")
     }
   }
-
   return(cookie)
 }
diff --git a/README.md b/README.md
index 602806b..d874549 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,10 @@
 
-### fitbitScraper 0.1.7
+### fitbitScraper 0.1.8
+
+New changes: 
+* Added minutesSedentary data to 'get_daily_data'
+* fixed bug in the column names in ‘get_daily_data’ for getTimeInHeartRateZonesPerDay  
+* if login returns a cookie that is character(0), throw error  
 
 This package scrapes data from fitbit.com  
 It only works if you use email / password to login. Not sure about facebook or google login.  
@@ -28,5 +33,3 @@ ggplot(df) + geom_bar(aes(x=time, y=data, fill=data), stat="identity") +
 df <- get_daily_data(cookie, what="steps", start_date="2015-01-13", end_date="2015-01-20")  
 ggplot(df) + geom_point(aes(x=time, y=data))  
 ```
-### Changed function
-- get_activity_data() - end_date now works. Start_date removed.
diff --git a/build/vignette.rds b/build/vignette.rds
index ce0875b..a1ff00f 100644
Binary files a/build/vignette.rds and b/build/vignette.rds differ
diff --git a/inst/doc/fitbitScraper-examples.html b/inst/doc/fitbitScraper-examples.html
index abd7198..707a771 100644
--- a/inst/doc/fitbitScraper-examples.html
+++ b/inst/doc/fitbitScraper-examples.html
@@ -7,6 +7,7 @@
 <meta charset="utf-8">
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta name="generator" content="pandoc" />
+
 <meta name="viewport" content="width=device-width, initial-scale=1">
 
 <meta name="author" content="Cory Nissen" />
@@ -56,6 +57,7 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf
 </style>
 
 
+
 <link href="data:text/css;charset=utf-8,body%20%7B%0Abackground%2Dcolor%3A%20%23fff%3B%0Amargin%3A%201em%20auto%3B%0Amax%2Dwidth%3A%20700px%3B%0Aoverflow%3A%20visible%3B%0Apadding%2Dleft%3A%202em%3B%0Apadding%2Dright%3A%202em%3B%0Afont%2Dfamily%3A%20%22Open%20Sans%22%2C%20%22Helvetica%20Neue%22%2C%20Helvetica%2C%20Arial%2C%20sans%2Dserif%3B%0Afont%2Dsize%3A%2014px%3B%0Aline%2Dheight%3A%201%2E35%3B%0A%7D%0A%23header%20%7B%0Atext%2Dalign%3A%20center%3B%0A%7D%0A%23TOC%20%7B%0Aclear%3A%20bot [...]
 
 </head>
@@ -64,14 +66,11 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf
 
 
 
-<div class="fluid-row" id="header">
 
-
-<h1 class="title">fitbitScraper Examples</h1>
+<h1 class="title toc-ignore">fitbitScraper Examples</h1>
 <h4 class="author"><em>Cory Nissen</em></h4>
 <h4 class="date"><em>5/5/2016</em></h4>
 
-</div>
 
 
 <div id="installation" class="section level2">
@@ -96,7 +95,7 @@ df <-<span class="st"> </span><span class="kw">do.call</span>(rbind, df_list)
 <span class="st">  </span><span class="kw">geom_bar</span>(<span class="kw">aes</span>(<span class="dt">x=</span>time, <span class="dt">y=</span>steps), <span class="dt">stat=</span><span class="st">"identity"</span>) +<span class="st"> </span>
 <span class="st">  </span><span class="kw">theme_tufte</span>() +<span class="st"> </span>
 <span class="st">  </span><span class="kw">scale_x_datetime</span>(<span class="dt">name=</span><span class="st">"date"</span>, <span class="dt">date_breaks=</span><span class="st">"1 day"</span>, <span class="dt">date_labels=</span><span class="st">"%b-%d"</span>)</code></pre></div>
-<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAGACAMAAABC/kH9AAAAolBMVEUAAAAAADoAAGYAOjoAOpAAZmYAZrY6AAA6ADo6AGY6OpA6ZrY6kNtZWVlmAABmADpmAGZmOpBmZgBmZrZmkNtmtttmtv+QOgCQOjqQOmaQZpCQkDqQkLaQkNuQtv+Q27aQ2/+2ZgC2Zma2kJC2tma2tv+2/9u2///bkDrbkGbbkJDb29vb2//b/7bb////tmb/tpD/trb/25D//7b//9v///+8OLqoAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAMiUlEQVR4nO3cC3ubRhbGcZL1Wtusxk2a1k7SbWplL1azqZRF4vt/tR2ELiDNAGdgQBz93+cJsWUd5mh+4mZjJxlRnWTsBkjcAKw8ACsPwMoDsPIArDwAKw/AygOw8gCsPAArD8DKA7DyAKw8ACsPw [...]
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAGACAMAAABC/kH9AAAA/1BMVEUAAAAAADoAAGYAOjoAOpAAZrYzMzM6AAA6ADo6AGY6kNtNTU1NTW5NTY5NbqtNjo5NjshZWVlmAABmAGZmZrZmkNtmtv9uTU1uTY5ubqtujshuq+SOTU2OTW6OTY6ObquOjk2OjsiOq+SOyOSOyP+QOgCQOmaQZpCQkNuQ27aQ2/+rbk2rbm6rbo6rjqurq26rq8iryP+r5Mir5P+2ZgC2Zma2kJC2/9u2///Ijk3Ijo7IyI7IyP/I///bkDrbkGbbkJDb29vb/7bb///kq27kq47kq6vk5P/k/8jk////tmb/yI7/yKv/yMj/25D/5Kv//7b//8j//9v//+T////zuB51AAAACXBIWXMAAA7DAAAOwwHHb6hkAAANV0lEQVR4nO2dDXfbSBlG3ZK2U [...]
 <p>You can get a daily summary of your data also. Here, I download data for the number of flights of stairs I climbed for the last two months. Then, compute the average number of flights of stairs by day, and graph it. Not surprisingly, I climb more stairs on the weekends when I’m home than I do at work during the week. Note that it is possible to get this data using <code>get_intraday_data()</code> for each day, but this is much more efficient using just one call to the fibit API for th [...]
 <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">df <-<span class="st"> </span><span class="kw">get_daily_data</span>(<span class="dt">cookie=</span>cookie, <span class="dt">what=</span><span class="st">"floors"</span>, <span class="dt">start_date=</span><span class="st">"2016-02-15"</span>,
                      <span class="dt">end_date=</span><span class="st">"2016-05-01"</span>)
@@ -115,7 +114,7 @@ avgs$day <-<span class="st"> </span><span class="kw">factor</span>(avgs$day,
             <span class="dt">vjust=</span><span class="fl">1.1</span>, <span class="dt">colour=</span><span class="st">"white"</span>) +<span class="st"> </span>
 <span class="st">  </span><span class="kw">theme</span>(<span class="dt">axis.text.y=</span><span class="kw">element_blank</span>(), <span class="dt">axis.ticks.y=</span><span class="kw">element_blank</span>()) +<span class="st"> </span>
 <span class="st">  </span><span class="kw">theme</span>(<span class="dt">plot.title=</span><span class="kw">element_text</span>(<span class="dt">vjust=</span>.<span class="dv">5</span>)) </code></pre></div>
-<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAGACAMAAABC/kH9AAABLFBMVEUAAAAAADoAAGYAOjoAOpAAZrY6AAA6ADo6AGY6OgA6Ojo6OmY6OpA6ZmY6ZpA6ZrY6kLY6kNtZWVlZWXhZWZRZeLFZlMtmAABmADpmAGZmOpBmZgBmZrZmkLZmkNtmtrZmtttmtv94WVl4seWQOgCQOjqQOmaQZgCQZmaQZpCQkDqQkJCQkLaQkNuQtpCQtv+Q27aQ29uQ2/+UWVmUeLGUy/+xeFmxlLGx5f+2ZgC2Zjq2Zma2kDq2kJC2tma2tra2tv+225C22/+2/7a2/9u2///LlFnL/+XL///bkDrbkGbbkJDbtmbbtrbb25Db27bb29vb/7bb///lsXjl5eXl/8vl/+Xl////tmb/tpD/trb/y5T/25D/5bH/5eX//7b//8v//9v//+X///9Uo [...]
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAGACAMAAABC/kH9AAABm1BMVEUAAAAAADoAAGYAOjoAOpAAZrYzMzM6AAA6AGY6OpA6ZpA6ZrY6kNtNTU1NTW5NTY5NbqtNjshZWVlZWXhZWZRZeLFZlMtmAABmADpmAGZmOpBmkNtmtv9uTU1uTW5uTY5ubk1ubm5ubo5ubqtujo5ujqtuq8huq+R4WVl4seWOTU2OTW6OTY6Ojk2OjsiOq8iOq+SOyMiOyOSOyP+QOgCQOjqQOmaQZgCQZmaQZpCQkNuQ29uQ2/+UWVmUeLGUy/+rbk2rbm6rjqurq26rq6urq8iryKuryP+r5Mir5OSr5P+xeFmxlLGx5f+2ZgC2Zjq2Zma2kDq2kJC2tra2tv+225C2/7a2/9u2///Ijk3Ijm7Iq6vIyI7I5KvI5P/I/8jI/+TI///LlFnL/+XL/ [...]
 <p>Another thing to look at, especially if you have the <a href="https://www.fitbit.com/aria">Aria scale</a>, is your weight. You can record your weight manually in the fitbit app, which is how I do it, or the Aria scale will sync it automatically. Any how, let’s graph my steps vs. weight for a time period and see if there seems to be a correlation. Data is returned for use in a graph on the fitbit page, so if you include a date range larger than two weeks or so, it returns data for a su [...]
 <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="co"># don't do this...</span>
 <span class="co"># mywt <- get_weight_data(cookie, start_date="2015-01-01", end_date="2015-05-01")</span>
@@ -153,7 +152,7 @@ df <-<span class="st"> </span><span class="kw">merge</span>(wt_df, step_df, <
 <span class="st">  </span><span class="kw">geom_point</span>() +<span class="st"> </span>
 <span class="st">  </span><span class="kw">stat_smooth</span>(<span class="dt">se=</span><span class="ot">FALSE</span>) +<span class="st"> </span>
 <span class="st">  </span><span class="kw">theme_tufte</span>()</code></pre></div>
-<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAGACAMAAABC/kH9AAAAnFBMVEUAAAAAADoAAGYAOjoAOpAAZmYAZrYzZv86AAA6AGY6OpA6ZrY6kNtmAABmADpmAGZmOpBmZgBmZrZmkNtmtrZmtv+QOgCQOjqQOmaQZpCQkDqQkNuQtv+Q27aQ2/+2ZgC2Zma2kJC2tv+225C2/9u2///bkDrbkGbbkJDbtmbb2//b/7bb////tmb/tpD/trb/25D//7b//9v///822OzOAAAACXBIWXMAAA7DAAAOwwHHb6hkAAALrElEQVR4nO2dC3vaOBpGnUw2IS00M82QtNsW0tmFzu5Ca+P//9/WMjdjG+OL5MvLOU/jgoFPHxxk2TKSvRCk8bpOANyCYHEQLA6CxUGwOAgWB8HiIFgcBIuDYHEQLA6CxUGwOAgWB8HiIFgcBIuDYHGKBc/H0 [...]
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAGACAMAAABC/kH9AAAA/FBMVEUAAAAAADoAAGYAOjoAOpAAZrYzMzMzZv86AAA6AGY6OpA6ZrY6kNtNTU1NTW5NTY5NbqtNjo5NjshmAABmADpmAGZmZrZmkNtmtrZmtv9uTU1uTY5ubqtujshuq+SOTU2OTW6OTY6ObquOjk2OjsiOq+SOyP+QOgCQOmaQZpCQkNuQtv+Q2/+rbk2rbm6rbo6rjqurq26rq+SryP+r5Mir5P+2ZgC2Zma225C2/9u2///Ijk3Ijo7Iq6vIyP/I///bkDrbkJDbtmbb/7bb///kq27kq47k5P/k////tmb/yI7/yKv/yMj/25D/5Kv//7b//8j//9v//+T///8UMBqZAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAL40lEQVR4nO2dC3vTyBlGBeWSdiOWJ [...]
 <p>That last example illustrates one of the limitations of retrieving the data the way this library does. Instead of using the “official” fitbit API, this library uses the API intended for their website developer to use to build the visualizations on the web dashboard. So, there’s no public documentation. This results in situations like the last one where the weight data returned by that API call is intended to be used in a chart, so they don’t need more than 20 points, so that’s all tha [...]
 </div>
 
diff --git a/man/get_activity_data.Rd b/man/get_activity_data.Rd
index 9e30cac..241b444 100644
--- a/man/get_activity_data.Rd
+++ b/man/get_activity_data.Rd
@@ -12,17 +12,7 @@ get_activity_data(cookie, end_date)
 \item{end_date}{Date in YYYY-MM-DD format}
 }
 \value{
-A dataframe with thirteen columns:
- \item{id}{The fitbit ID of the activity}
- \item{name}{Name for the type of activity}
- \item{date}{Date of the activity}
- \item{start_time}{Start time for the activity}
- \item{distance}{Distance travelled during the activity}
- \item{duration}{Duration in hours:minutes:seconds of the activity}
- \item{calories}{Calories burned during the activity}
- \item{steps}{Steps taken the activity}
- \item{start_datetime}{A POSIXct encoded start time for the activity}
- \item{end_datetime}{A POSIXct encoded end time for the activity}
+A dataframe with raw output from Fitbit
 }
 \description{
 Get activity data from fitbit using cookie returned from login function
@@ -34,4 +24,3 @@ get_activity_data(cookie, end_date="2015-01-20")
 get_activity_data
 }
 \keyword{data}
-
diff --git a/man/get_daily_data.Rd b/man/get_daily_data.Rd
index bfcbbd5..637301b 100644
--- a/man/get_daily_data.Rd
+++ b/man/get_daily_data.Rd
@@ -9,7 +9,7 @@ get_daily_data(cookie, what = "steps", start_date, end_date)
 \arguments{
 \item{cookie}{Cookie returned after login, specifically the "u" cookie}
 
-\item{what}{What data you wish to be returned. Options include "steps", "distance", "floors", "minutesVery", "caloriesBurnedVsIntake", "getTimeInHeartRateZonesPerDay", "getRestingHeartRateData"}
+\item{what}{What data you wish to be returned. Options include "steps", "distance", "floors", "minutesVery", "caloriesBurnedVsIntake", "minutesSedentary", "getTimeInHeartRateZonesPerDay", "getRestingHeartRateData"}
 
 \item{start_date}{Date in YYYY-MM-DD format}
 
@@ -30,4 +30,3 @@ get_daily_data(cookie, what="steps", start_date="2015-01-13", end_date="2015-01-
 get_daily_data
 }
 \keyword{data}
-
diff --git a/man/get_intraday_data.Rd b/man/get_intraday_data.Rd
index a521104..8946cc6 100644
--- a/man/get_intraday_data.Rd
+++ b/man/get_intraday_data.Rd
@@ -28,4 +28,3 @@ get_intraday_data(cookie, what="steps", date="2015-01-20")
 get_intraday_data
 }
 \keyword{data}
-
diff --git a/man/get_premium_export.Rd b/man/get_premium_export.Rd
index 164d920..af0dc26 100644
--- a/man/get_premium_export.Rd
+++ b/man/get_premium_export.Rd
@@ -31,4 +31,3 @@ get_premium_export(cookie, what="ACTIVITIES", start_date="2015-01-13", end_date=
 get_premium_export
 }
 \keyword{data}
-
diff --git a/man/get_sleep_data.Rd b/man/get_sleep_data.Rd
index 481d928..180bc58 100644
--- a/man/get_sleep_data.Rd
+++ b/man/get_sleep_data.Rd
@@ -28,4 +28,3 @@ get_sleep_data(cookie, start_date="2015-01-13", end_date="2015-01-20")
 get_sleep_data
 }
 \keyword{data}
-
diff --git a/man/get_weight_data.Rd b/man/get_weight_data.Rd
index 482948e..3892119 100644
--- a/man/get_weight_data.Rd
+++ b/man/get_weight_data.Rd
@@ -28,4 +28,3 @@ get_weight_data(cookie, start_date="2015-01-13", end_date="2015-01-20")
 get_weight_data
 }
 \keyword{data}
-
diff --git a/man/login.Rd b/man/login.Rd
index 0278208..7d81d63 100644
--- a/man/login.Rd
+++ b/man/login.Rd
@@ -26,4 +26,3 @@ cookie <- login(email="corynissen<at>gmail.com", password="mypasswordhere")
 login
 }
 \keyword{login}
-

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/r-cran-fitbitscraper.git



More information about the debian-med-commit mailing list