kblin / ncbi-acc-download

Download files from NCBI Entrez by accession
Apache License 2.0
111 stars 8 forks source link

Add support for API key input #17

Closed DarianHole closed 4 years ago

DarianHole commented 4 years ago

Hi @kblin,

I've added a parameter to allow the user to provide their NCBI API key when doing requests.

Please let me know what you think and if I should change/modify anything on this. I think that maybe I should add an error for an invalid API key input but I'm curious on your thoughts first.

edit for small note: ID not found and wrong API key are the same error number --> 400

Darian

zdk123 commented 4 years ago

FWIW, I vote for this being integrated.

kblin commented 4 years ago

Hi there. I apparently missed the notification for this PR in March, sorry about that.

DarianHole commented 4 years ago

@kblin Oh no worries on that, I probably should have asked for a review ages ago too!

I'm a bit swamped at the moment but I could hopefully make those changes sometime for next week provided you give me what you want modified about the version number as everyone likes it done differently :)

I added a test that hopefully addresses making sure that the api_key is found in the url

kblin commented 4 years ago

Hi @DarianHole, thanks again for your contribution! Sorry this all took so long.