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

Missing send_template method #1

Closed
anirvan opened this issue Oct 18, 2013 · 2 comments
Closed

Missing send_template method #1

anirvan opened this issue Oct 18, 2013 · 2 comments

Comments

@anirvan
Copy link

anirvan commented Oct 18, 2013

WebService::Mandrill works great, but it's missing support for a send_template method (documented at https://mandrillapp.com/api/docs/messages.JSON.html#method=send-template)

Any chance that could be added?

Something like this would work:

send_template => {
    path      => 'messages/send-template',
    mandatory => [ 'template_name', 'template_content'],
},

…as long as it's clear in the documentation that all the other configuration options (e.g. "to") need to be inside a message block, e.g.:

my $response = $mandrill->send_template(
    template_name => 'template-name-here',
    template_content => [ ... ],
    message => {
        to => [
            { name => 'First Last',
              email => 'first.last@example.dom' },
            ],
    }
);

Thanks!

@nupfel nupfel closed this as completed in 4038887 Oct 18, 2013
@nupfel
Copy link
Owner

nupfel commented Oct 18, 2013

thanks for the comment! i'm sorry for the lack of documentation. i was hoping it's mostly self explanatory... but i should really add some more documentation.
i added the missing command and started thinking of a better way to handle non flat hashes in a nicer way in Web::API. feel free to contribute your thoughts or patches!

@anirvan
Copy link
Author

anirvan commented Oct 18, 2013

This is great! Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants