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

Make SendGrid a factory that enables multiple prototype instances #277

Merged
merged 1 commit into from
Sep 9, 2016

Conversation

mrfelton
Copy link

Patch to support #275

@thinkingserious
Copy link
Contributor

Hello @mrfelton,

Thanks for the pull requests!

Could you please shoot us a signed CLA? https://github.com/sendgrid/sendgrid-nodejs/blob/master/CONTRIBUTING.md#cla

@thinkingserious thinkingserious added type: community enhancement feature request not on Twilio's roadmap status: cla needed and removed status: cla needed labels Aug 22, 2016
@thinkingserious
Copy link
Contributor

Hi @mrfelton,

Is this one ready for review to merge?

@mrfelton
Copy link
Author

@thinkingserious - yes. We're using this version of the code and it does the job. I made sure to keep the public interface exactly the same. Just now now calling sendgrid(API_KEY) will fetch you a new instance of the class with the API_KEY configured on it. This allows you to have multiple independent instances each with a differently configured API key.

@thinkingserious thinkingserious merged commit 3751074 into sendgrid:master Sep 9, 2016
thinkingserious added a commit that referenced this pull request Sep 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: community enhancement feature request not on Twilio's roadmap
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants