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

REST API details should not need to be included for sending email #297

Closed
mikemaccana opened this issue Sep 16, 2016 · 4 comments
Closed
Labels
type: question question directed at the library

Comments

@mikemaccana
Copy link

mikemaccana commented Sep 16, 2016

Issue Summary

Helper shouldn't require user to care about methods or paths: it should help people send emails with sensible defaults, like every other API client on npm.

Steps to Reproduce

  1. Look at sendgrid v2.
  2. Use sendgrid v4 and wonder why helper.Email() (at least according to the examples) code requires lower level concepts. I don't care about what your endpoint is, unless I'm overriding it, that's why I'm using your library rather than raw requests. Have sensible defaults.
@eizzo
Copy link

eizzo commented Sep 16, 2016

it should help people send emails with sensible defaults, like every other API client on npm

Unfortunately this module behaves more like a basic helper set for constructing sendgrid payloads. And it ought to prevent malformatted json from hitting the API in the first place. At the very least, proper documentation would be preferred to learning of the module's shortcomings through errors in the API response body. Definitely needs more polish all around.

@thinkingserious thinkingserious added the type: question question directed at the library label Sep 16, 2016
@thinkingserious
Copy link
Contributor

Hello @mikemaccana,

You are correct and changes are coming soon, please see: #290

@eizzo,

Yes, the purpose of this first rewrite was to get low level support for all of the v3 Web API going, while removing the tight coupling the previous library had on the previous mail send endpoint. We invite you to join us on that journey, please take a look at this when have a moment: #290

I'm looking forward to both of your feedback as we continue down the road of fully implementing this library.

Thanks for your support!

I'm closing this ticket; however, please feel free to open new issues or pull requests with specific implementation details or ideas.

@honkskillet
Copy link

Any help coming soon to remove/sidestep this helper madness?

@thinkingserious
Copy link
Contributor

Hi @honkskillet,

Yes :)

Please follow the Mail Helper Enhancement (v3 mail/send) project if you would like to follow or contribute. @adamreisnz will propose the new helper interface there for community feedback.

With Best Regards,

Elmer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question question directed at the library
Projects
None yet
Development

No branches or pull requests

4 participants