Commits

Dustin Shields-Cloues committed 10a0292

Messages with multiple recipients can now specify unique metadata for each recipient.

Comments (0)

Files changed (3)

     port:   443,
     prefix: '/api/1.0/',
     method: 'POST',
-    headers: {'Content-Type': 'application/json', 'User-Agent': 'Mandrill-Node/1.0.2'}
+    headers: {'Content-Type': 'application/json', 'User-Agent': 'Mandrill-Node/1.0.3'}
 }
 
 class exports.Mandrill
          - google_analytics_domains {Array} an array of strings indicating for which any matching URLs will automatically have Google Analytics parameters appended to their query string automatically.
          - google_analytics_campaign {Array|string} optional string indicating the value to set for the utm_campaign tracking parameter. If this isn't provided the email's from address will be used instead.
          - metadata {Array} metadata an associative array of user metadata. Mandrill will store this metadata and make it available for retrieval. In addition, you can select up to 10 metadata fields to index and make searchable using the Mandrill search api.
+         - recipient_metadata {Array} Per-recipient metadata that will override the global values specified in the metadata parameter.
+             - recipient_metadata[] {Object} metadata for a single recipient
+                 - rcpt {String} the email address of the recipient that the metadata is associated with
+                 - values {Array} an associated array containing the recipient's unique metadata. If a key exists in both the per-recipient metadata and the global metadata, the per-recipient metadata will be used.
          - attachments {Array} an array of supported attachments to add to the message
              - attachments[] {Object} a single supported attachment
                  - type {String} the MIME type of the attachment - allowed types are text/*, image/*, and application/pdf
          - google_analytics_domains {Array} an array of strings indicating for which any matching URLs will automatically have Google Analytics parameters appended to their query string automatically.
          - google_analytics_campaign {Array|string} optional string indicating the value to set for the utm_campaign tracking parameter. If this isn't provided the email's from address will be used instead.
          - metadata {Array} metadata an associative array of user metadata. Mandrill will store this metadata and make it available for retrieval. In addition, you can select up to 10 metadata fields to index and make searchable using the Mandrill search api.
+         - recipient_metadata {Array} Per-recipient metadata that will override the global values specified in the metadata parameter.
+             - recipient_metadata[] {Object} metadata for a single recipient
+                 - rcpt {String} the email address of the recipient that the metadata is associated with
+                 - values {Array} an associated array containing the recipient's unique metadata. If a key exists in both the per-recipient metadata and the global metadata, the per-recipient metadata will be used.
          - attachments {Array} an array of supported attachments to add to the message
              - attachments[] {Object} a single supported attachment
                  - type {String} the MIME type of the attachment - allowed types are text/*, image/*, and application/pdf
     method: 'POST',
     headers: {
       'Content-Type': 'application/json',
-      'User-Agent': 'Mandrill-Node/1.0.2'
+      'User-Agent': 'Mandrill-Node/1.0.3'
     }
   };
 
              - google_analytics_domains {Array} an array of strings indicating for which any matching URLs will automatically have Google Analytics parameters appended to their query string automatically.
              - google_analytics_campaign {Array|string} optional string indicating the value to set for the utm_campaign tracking parameter. If this isn't provided the email's from address will be used instead.
              - metadata {Array} metadata an associative array of user metadata. Mandrill will store this metadata and make it available for retrieval. In addition, you can select up to 10 metadata fields to index and make searchable using the Mandrill search api.
+             - recipient_metadata {Array} Per-recipient metadata that will override the global values specified in the metadata parameter.
+                 - recipient_metadata[] {Object} metadata for a single recipient
+                     - rcpt {String} the email address of the recipient that the metadata is associated with
+                     - values {Array} an associated array containing the recipient's unique metadata. If a key exists in both the per-recipient metadata and the global metadata, the per-recipient metadata will be used.
              - attachments {Array} an array of supported attachments to add to the message
                  - attachments[] {Object} a single supported attachment
                      - type {String} the MIME type of the attachment - allowed types are text/*, image/*, and application/pdf
              - google_analytics_domains {Array} an array of strings indicating for which any matching URLs will automatically have Google Analytics parameters appended to their query string automatically.
              - google_analytics_campaign {Array|string} optional string indicating the value to set for the utm_campaign tracking parameter. If this isn't provided the email's from address will be used instead.
              - metadata {Array} metadata an associative array of user metadata. Mandrill will store this metadata and make it available for retrieval. In addition, you can select up to 10 metadata fields to index and make searchable using the Mandrill search api.
+             - recipient_metadata {Array} Per-recipient metadata that will override the global values specified in the metadata parameter.
+                 - recipient_metadata[] {Object} metadata for a single recipient
+                     - rcpt {String} the email address of the recipient that the metadata is associated with
+                     - values {Array} an associated array containing the recipient's unique metadata. If a key exists in both the per-recipient metadata and the global metadata, the per-recipient metadata will be used.
              - attachments {Array} an array of supported attachments to add to the message
                  - attachments[] {Object} a single supported attachment
                      - type {String} the MIME type of the attachment - allowed types are text/*, image/*, and application/pdf
   "author": "Mandrill Devs <community@mandrill.com> (http://mandrill.com)",
   "name": "mandrill-api",
   "description": "The official API client for the Mandrill email as a service product.",
-  "version": "1.0.2",
+  "version": "1.0.3",
   "homepage": "https://bitbucket.org/mailchimp/mandrill-api-node",
   "repository": {
     "type": "git",