Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    marketo-soap-securitypublic

    marketo-soap-security

    For use with node soap module as the security object for accessing Marketo's SOAP API.

    Written in LiveScript, but accessible from JavaScript.

    Exports:

    MarketoSecurity

    This is a class. Constructor parameters:

    client-access-ID secret-key

    Use (in LiveScript):

    soap              = require \soap
    {MarketoSecurity} = require \marketo-soap-security
    
    wsdl-url = 'https://na-c.marketo.com/soap/mktows/1_7?WSDL'
    err, client <- soap.create wsdl-url
    client.set-security MarketoSecurity do
        'your client access ID here'
        'your secret key here'
    
    ...
    

    Use (in JavaScript):

    var soap, MarketoSecurity, wsdlUrl;
    soap = require('soap');
    MarketoSecurity = require('marketo-soap-security').MarketoSecurity;
    wsdlUrl = 'https://na-c.marketo.com/soap/mktows/1_7?WSDL';
    soap.create(wsdlUrl, function(err, client){
      return client.setSecurity(MarketoSecurity('your client access ID here', 'your secret key here'));
    });
    

    get-W3C-timestamp (getW3CTimestamp)

    A function. Takes a date and returns a properly formated W3C timestamp.

    Use (in LiveScript):

    {get-W3C-timestamp} = require \marketo-soap-security
    timestamp = get-W3C-timestamp new Date '2012-09-12'
    

    Use (in JavaScript):

    var getW3CTimestamp, timestamp;
    getW3CTimestamp = require('marketo-soap-security').getW3CTimestamp;
    timestamp = getW3CTimestamp(new Date('2012-09-12'));
    

    Keywords

    none

    install

    npm i marketo-soap-security

    Downloadsweekly downloads

    34

    version

    0.0.2

    license

    none

    repository

    githubgithub

    last publish

    collaborators

    • avatar