Skip to content
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

Refactor stream function, remove list functions #14

Merged
merged 4 commits into from Jun 8, 2015

Conversation

danielberkompas
Copy link
Owner

The ExTwilio.Api.stream/2 function has now become the ExTwilio.ResultStream module. The code is a lot more readable as a result.

With this nice ResultStream module in place, we don't really need the old list functions, since there's really no reason to interact with the paginated api directly. All the filtering that you could do can be done through ResultStream, and it provides a safer, more efficient interface.

Extract the complex `stream` method in the Api module to a
`ResultStream` module where it can have room to breath.
The list functions are not needed now that we have a good
`ResultStream`. There really isn’t a reason why you would prefer to use
the old paginated list api.
This is for consistency with the other function in `Parser`, `parse/2`.
It also makes it much easier to chain.
danielberkompas added a commit that referenced this pull request Jun 8, 2015
Refactor `stream` function, remove list functions
@danielberkompas danielberkompas merged commit 7041abf into master Jun 8, 2015
@danielberkompas danielberkompas deleted the refactor-streams branch June 8, 2015 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant