kanej-sails-semrush

0.0.3 • Public • Published

sails-semrush - An SEMRush API library for Node.js and Sail.js

This module provides calls to the SEMRushAPI for Nodejs and Sails.js.

Installation

You can install this through npm: npm install sails-semrush

Usage

var SEMRushAPI = require('sails-semrush');
var semrush = new SEMRushAPI('<YOUR API KEY>');

semrush.<ReportType>('<DOMAIN>', {<RequestParams>}, function(err, response) {
  if (err) throw err;

  // sails-semrush returns camelCased columns names and then the csv is converted to JSON.
  // See http://www.semrush.com/api.html for format of returned object before camelCasing and special character removal. 
  

  var report = response;

  // Do something with data
});

Discrepancies

SEMRush loves to return data in a csv format with certain columns containing special characters that are not allowed in databases such as mongodb. sails-semrush gets rid of that and removes special characters while camelCasing the column names before exporting the csv as JSON. This makes it more native to Node.js. As always, I'm very open to Pull Requests!

Readme

Keywords

none

Package Sidebar

Install

npm i kanej-sails-semrush

Weekly Downloads

1

Version

0.0.3

License

MIT

Unpacked Size

9.34 kB

Total Files

4

Last publish

Collaborators

  • kanej