Skip to content

Adding missing find_all capability to event resources #141

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

Merged
merged 1 commit into from
Feb 6, 2017

Conversation

shevron
Copy link
Contributor

@shevron shevron commented Dec 24, 2016

It seems that find_all() was missing from intercom.events. In order to add it, I had to introduce a slightly different paging behavior (not sure why this API inconsistency).

The least obtrusive way I found to do this was to allow overriding the CollectionProxy class for FindAll and to create a dedicated CollectionProxy subclass for events which overrides paging_info_present.

It works well for me, I hope that for others this will be useful as well.

- Added the ability to override the default CollectionProxy class in the FindAll mixin
- Created a dedicated Proxy class for Events which handles paging differently, based on the current Event API
@coveralls
Copy link

coveralls commented Dec 24, 2016

Coverage Status

Coverage decreased (-0.04%) to 95.304% when pulling ef4c89f on shevron:v3-event-find-all into 9d6bc47 on jkeyes:version-3.

@jkeyes jkeyes changed the base branch from version-3 to events-find-all February 6, 2017 22:34
@jkeyes jkeyes merged commit fef908c into intercom:events-find-all Feb 6, 2017
@jkeyes
Copy link
Contributor

jkeyes commented Feb 6, 2017

@shevron I've rounded out the PR with tests. Thanks for contributing. As it happens intercom-ruby doesn't support multipage results either, so I submitted a PR for that. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants