fhdsl / metricminer

R package that digs up data that matters from APIs, making it dashboard-ready
https://hutchdatascience.org/metricminer/
MIT License
2 stars 0 forks source link

Confusion with miscommunication between `set_token()` and `get_stored_token()` #35

Closed howardbaik closed 10 months ago

howardbaik commented 11 months ago

@cansavvy I'm confused as to why the set_token() is setting options(google = token) on line 17 and when we actually get the stored token in get_stored_token(), we use the .RDS file instead of using the options that we set.

This confusion comes from adding withr::local_options() here and realizing that I can't use withr::local_options() for the Google Analytics functions because the token is stored in an RDS file, instead of an option.

cansavvy commented 11 months ago

Ah yes. Sorry I forgot to answer you in this. I think I've addressed the inconsistency on this other branch but it's not yet on a PR

It's here https://github.com/fhdsl/metricminer/blob/bbf3f0c05d6ffcb0dca9fadb9bd87140f169a3d9/R/token-handlers.R#L77C1-L77C1

cansavvy commented 11 months ago

When I get that pull request up, you can review to see if it addresses the inconsistencies you are seeing and then we can close this issue after that PR gets merged.