site-analyzer
v0.1.2
Published
Site Analyzer api nodejs module
Downloads
2
Readme
Site Analyzer api module for nodejs
Site Analyzer API documentation: https://api.site-analyzer.com/documentation/
This software is released under the MIT license. See LICENSE
for more details
Download and Installation
From the command line
$ npm install site-analyzer
package.json
dependencies: {
...
"site-analyzer": "*$version*",
...
}
...
Example use
var SiteAnalyzer = require('site-analyzer');
var sa = new SiteAnalyzer({
clientId: 'YOUR_CONSUMER_KEY',
clientSecret: 'YOUR_CONSUMER_SECRET',
});
sa.pageAnalizer('http://wikipedia.org', function(error, results){
if(error) return console.error(error);
console.log(results);
});
Documentation
Initialize Ritetag object:
var SiteAnalyzer = require('ritetag');
var sa = new SiteAnalyzer({
clientId: 'YOUR_CONSUMER_KEY' || process.env.SiteAnalyzerClientId,
clientSecret: 'YOUR_CONSUMER_SECRET' || process.env.SiteAnalyzerClientSecret,
debug: false //optional
});
domainInfo(domain, callback)
Domain Info get data about a domain name : availability, owner, registrar, creation data and expiration data.
sa.domainInfo('www.wikipedia.org', function(error, results){
...
});
pageAnalizer(url, callback)
Get data and analyze results from a webpage on several criteria.
sa.pageAnalizer('http://wikipedia.org', function(error, results){
...
});
w3cValidation(domain, callback)
sa.w3cValidation('www.wikipedia.org', function(error, results){
...
});
urlScreenshot(url, options, callback)
Take screenshot.
Available options:
format
: screenshot dimensionfilePath
sa.urlScreenshot('www.wikipedia.org', {format: '768px*1024px', filePath: SCREENSHOT_FILE_PATH} function(error, results){
...
});
quota(callback)
Api quota status
sa.quota(function(error, results){
...
});