Mandrill.listTemplates()

List all templates available to a user

This machine returns _all_ templates- there is no pagination.

Usage

Hover over inputs/exits for more info.

var Mandrill = require('machinepack-mandrill');


// List all templates available to a user

Mandrill.listTemplates({

apiKey: '1dTOFDXzJdU5cXiMNd6jRq',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

apiKey required

A valid Mandrill API key.

'1dTOFDXzJdU5cXiMNd6jRq'

Exits

error

An unexpected error occurred.

'==='
success

OK.

[ { slug: 'machinepack-mandrill-test',
    name: 'machinepack-mandrill-test',
    code: '<div>Click <a href="*|RESET_LINK|*">here</a> to reset your password.</div>',
    publish_code: '',
    created_at: '2014-05-28 21:59:49.7001',
    updated_at: '2014-05-28 21:59:49.70012',
    publish_name: 'machinepack-mandrill-test',
    labels: [],
    text: 'Click on the following link to reset your password: \n *|RESET_LINK|*',
    publish_text: '',
    subject: '',
    publish_subject: '',
    from_email: '',
    publish_from_email: '',
    from_name: '',
    publish_from_name: '' } ]