Phantomjscloud.renderPages()

Get the browser-rendered version of the web pages at the specified URLs.

Usage

Hover over inputs/exits for more info.

var Phantomjscloud = require('machinepack-phantomjscloud');


// Get the browser-rendered version of the web pages at the specified URLs.

Phantomjscloud.renderPages({

apiKey: '138501da08e0130810f0a0b00c01331851',

urls: [ 'http://sailsjs.org/#/documentation/reference/sails.config/sails.config.models.html' ],

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

rateLimitExceeded: function () {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

apiKey required

Valid PhantomJS Cloud API key.

'138501da08e0130810f0a0b00c01331851'
urls required

URLs to render.

[ 'http://sailsjs.org/#/documentation/reference/sails.config/sails.config.models.html' ]

Exits

error

An unexpected error occurred.

rateLimitExceeded
success

OK.

[ { url: 'http://sailsjs.org/#/documentation/reference/sails.config/sails.config.models.html',
    html: '<!DOCTYPE html><html><head></head><body></body></html>' } ]