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

Add all endpoints for the programmable chat api. #81

Merged

Conversation

4141done
Copy link

@4141done 4141done commented Sep 13, 2017

Primary changes

Internal Changes

I ran into an issue where infer_module/1 couldn't be trusted to choose the correct module as submodules under ExTwilio are added. I played with a few options before settling on the strategy of defining a ExTwilio.Parent struct and supplying parents in that format for any resources under a submodule. This makes sure that we are always guaranteed to use the correct module to determine the resource name at the expense of some slightly less pretty but more explicit parent definitions. The UrlGenerator deals with all parents consistently regardless of how they were specified so the original resources can maintain their format.

Please let me know if you'd prefer a different strategy but this was what felt best to me in terms of maintaining how the package works and providing correctness.

Left to do

  • Squash commits

…ents in submodules are specified to avoid the module inference potentially hooking the wrong modules. Further added some documentation to parents/0 and children/0 under ExTwilio.Resource so that understanding their roles are easier for future contributors
@danielberkompas
Copy link
Owner

Very clean work. Thank you! ⭐️ ⭐️ ⭐️

@danielberkompas danielberkompas merged commit c3e4ef5 into danielberkompas:master Sep 21, 2017
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.

2 participants