-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add API key field to covidcast imports #55
base: dev
Are you sure you want to change the base?
Conversation
@melange396 also fixed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works, but it doesnt do its verification until the focus is moved off of the input field, and it doesnt repopulate the metadata until verified... The delay can be confusing and will be frustrating, unless perhaps we include a "working" indicator or similar. Did you explore triggering the key verification on typing (the on:input
event instead of on:change
)?
I moved the key verification to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small comment. Otherwise, the oninput w/ delayed request looks great!
src/api/EpiData.ts
Outdated
@@ -357,6 +369,7 @@ export function importFluView({ | |||
'num_age_4', | |||
'num_age_5', | |||
], | |||
'', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ick! The need to include this empty string is an ugly/unfortunate side effect from the recent addition of the columnRenamings
argument to loadDataSet()
in #66 (and because TypeScript doesnt have a "proper" named optional argument syntax).
Does this work? Its feels a lot less hacky:
'', | |
auth, # also remove `auth` from the `userParams` arg a few lines above |
We should standardize all of the other "importFoo()
" methods (for the endpoints that use an "authorization token") so they use the api_key
argument of loadDataSet()
too. I can see some rationale for doing that in PR #72, but its big enough already, and it doesnt touch this file, and the argument was introduced in this PR, so i think it belongs here.
Closes #47: