dietrichson / ProPublicaR

R Functions to Interact with the ProPublica APIs
GNU General Public License v2.0
12 stars 4 forks source link

Add pagination #8

Closed jsowder closed 4 years ago

jsowder commented 4 years ago
jsowder commented 4 years ago

Sorry about the force push, I was just cleaning up the history a bit

dietrichson commented 4 years ago

@jsowder, I am getting one failure when running tests. The error message from the test is not that informative, but when I try to run the function on it's own:

get_electronic_filing_byDate(2016, 2016, '01', '10', '31')

I get

Error in page - 1 : non-numeric argument to binary operator

The reason the test fails is that it expects a 500-code warning, not an error.

Can you reproduce?

dietrichson commented 4 years ago

Also the function get_congressional_statement_by_member already has a offset parameter (for some reason...), we should unify the two approaches. (I am fine with "pages").

jsowder commented 4 years ago

@jsowder, I am getting one failure when running tests. The error message from the test is not that informative, but when I try to run the function on it's own:

get_electronic_filing_byDate(2016, 2016, '01', '10', '31')

I get

Error in page - 1 : non-numeric argument to binary operator

The reason the test fails is that it expects a 500-code warning, not an error.

Can you reproduce?

Yes, I was able to reproduce and I just committed to a change in the test. The final argument was meant to be an erroneous API Key, but instead was being passed to page.

jsowder commented 4 years ago

And just removed the old offset parameter! I had already adjusted the function, but hadn't removed the parameter definition above.