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 **params
for all collection endpoints
#70
Add **params
for all collection endpoints
#70
Conversation
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.
The PR diff size of 15160 lines exceeds the maximum allowed for the inline comments feature.
d400b06
to
430bf49
Compare
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.
The PR diff size of 34454 lines exceeds the maximum allowed for the inline comments feature.
430bf49
to
737623e
Compare
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.
The PR diff size of 34454 lines exceeds the maximum allowed for the inline comments feature.
80e14a1
to
3786ade
Compare
Fixes made for bugs and style. Rubocop and codeclimate are still unhappy, but with issues that are present on master. Thought I should mention, also, that rubocop passes just fine locally, so I'm not quite sure why it's failing here. |
Because on github actions a newer version is installed of rubocop :) |
I'd already updated rubocop itself to v0.88.0, but yeah, I had neglected to update all the other 'rubocop-*' gems. Got the offences after upgrading them. Cheers! Made fixes and chucked them into a new PR ( #72 ), since they're unrelated to the work in this one. |
You can go ahead and merge those changes into this branch now and I'll get this merged! |
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 looks much better! 👍
213c242
to
dfb1813
Compare
…'offset' parameters.
dfb1813
to
5b19db2
Compare
Code Climate has analyzed commit 5b19db2 and detected 2 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
Merged in from There's not really anything, to my mind, that should be done to address it in this ticket. It'd require either:
Are there any options I'm missing? Do you have any suggestions? Or can you just do a manual override? |
Hi,
I realised I needed to be able to use the 'limit' and 'offset' pagination parameters for collections, otherwise I was only able to pull down the first 20 of any particular thing (specifically I needed to be able to access more than 20 custom fields).
I've added double-splat params to all the collection endpoint methods so that they can be supplied, as can anything else, rather than adding an explicit and specific arguments for them.
Let me know if you prefer another approach.
Also, I haven't written any tests for 'limit' and 'offset' (well, I did, but only for one endpoint, and it was hacky, so I figured I'd be better off getting feedback before spending the time on writing them for more endpoints). Let me know if you have any suggestions/preferences for tests. Do the pagination parameters need to be tested for every one of the collection endpoints? Also, do we need to test large numbers of items, or is 2 sufficient, do you think? Currently there's no easy way to generate an arbitrary number of different users set up. I see factory_bot is in there, but not set up for Contacts at least (in my hacky test, I just inserted counter into the email address to create 50 Contacts).