Giter VIP home page Giter VIP logo

fitbitr's People

Contributors

mrkaye97 avatar naltmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fitbitr's Issues

fitbitr does not expose restingHeartRate

Thank you for the awesome package, it makes interfacing with the fitbit very easy.

The fitbit API ( https://dev.fitbit.com/build/reference/web-api/heartrate-timeseries/get-heartrate-timeseries-by-date-range/ )
in addition to HeartRateZone also provides restingHeartRate as a part of the response data.

The get_heart_rate_zones -- which calls the fitbit API above -- does not return restingHeartRate in the dataframe (and also does not return customHeartRateZone which the API also provides).

Please incorporate restingHeartRate into the datastructure returned by get_heart_rate_zones() (which would save on the number of the API calls) or expose it through a different function.

Thanks

1. execute the following 
start_date <- lubridate::today() - lubridate::weeks(1)
end_date <- lubridate::today()

get_heart_rate_zones(start_date, end_date)

2. observe no restingHeartRate  in the returned data 

The app you're trying to connect did not provide valid information to Fitbit. Please report this issue to them.

Hi,

Thank you for creating this package. I have followed the instructions in read me and created the app.

Now, I am doing the following:

library(fitbitr)

generate_token(
  client_id = "xxxxx",
  client_secret = "xxxxxxxxxxx",
    callback = "http://localhost:1410/"
)

But that shows this message:
The app you're trying to connect did not provide valid information to Fitbit. Please report this issue to them.

Could you please guide me where I am making a mistake? Thank you.

token refresh only prompts to console

I am trying to load a token on a shiny app, but once it times out token refresh does not work as the console must be reached.

Can you make the default to TRUE for do_refresh or at least provide an option to change this to true?

function (reason, error_message)
{
inform(sprintf("%s. Error message: \n\n", reason))
inform(error_message$message)
inform("\n")
do_refresh <- askYesNo("Would you like to generate a new token?",
default = FALSE, prompts = c("y", "n", "c"))
if (do_refresh & !is.na(do_refresh)) {
inform("Trying to generate a new token...")
.fitbitr_token$init_credentials()
}
else {
abort("No token was found, and a new one was not generated.")
}
invisible()
}

`generate_token()` not working on rstudio server

In rstudio desktop (windows), the followings works:

generate_token(client_id = "XXXXXXX",
                          client_secret = "YYYYYYYYYYYYYYYYYYYYYYYYYYYY",
                          cache = TRUE)

I get Authentication complete. Please close this page and return to R. in the browser with url of the format http://localhost:1410/?code=XXXXXXXXXXXXXXX&state=YYYYYYYYY#_=_

However in RStudio server (running through docker) gives a "This site can’t be reached. localhost refused to connect." message in the browser.

The RStudio server can use the .httr-oauth generated just fine.

Any ideas? Let me know if you need more info.

Thanks!

Intraday functions: Column `time` not found in `.data`

I'm having difficulty running any of the intraday functions. For example, when I run
fitbitr::get_heart_rate_intraday()

I get the following error

Error in `dplyr::transmute()`:
In argument: `time = as_datetime(paste(date, .data$time))`.
Caused by error:
! error in evaluating the argument 'x' in selecting a method for function 'as_datetime': Column `time` not found in `.data`.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.