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

Added carrier support. typpo/textbelt#56 #57

Merged
merged 1 commit into from Dec 5, 2015

Conversation

alexionescu
Copy link
Contributor

Added a carriers.js file which holds the association of carriers to email addresses. This file was created from the providers.js file.

You can POST to /text getcarriers=1 or getcarriers=true to get the list of supported carriers.

You can POST carrier= to perform the lookup and only email the corresponding email address(es) instead of all of them. If carrier is null the previous behavior of emailing everyone takes effect so as to not break compatibility.

There is also some error handling for when a user specifies a non existent carrier.

Feedback welcome.

#56

@typpo
Copy link
Owner

typpo commented Dec 1, 2015

Thanks Alex, this is a great change! I'm traveling until tomorrow but will test it ASAP, merge, and get it live. 👍

@typpo
Copy link
Owner

typpo commented Dec 5, 2015

This looks good overall! I may change it so that you can specify carrier via query param (?carrier=foo) rather than POST. And also change the option to list carriers to a normal GET route.

I am also concerned about confusing "carriers" with "providers" as they are basically the same thing. We may want to pick one terminology to help disambiguate.

Also, we need to update the README and website.

This is a sorely needed change so I will merge it and get to work on the rest :) Thank you for the great work!

typpo added a commit that referenced this pull request Dec 5, 2015
@typpo typpo merged commit 4a84a8d into typpo:master Dec 5, 2015
@alexionescu
Copy link
Contributor Author

No probs!

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.

None yet

2 participants