2.0.0 • Published 6 years ago

sitedata v2.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

sitedata

Node wrapper for the SiteData.io API.

Promise Example

const SiteData = require("sitedata")
const sitedata = new SiteData({ token: "YOUR_API_TOKEN" })

sitedata.metric
  .index({ url: "example.com", "match": "contains" })
  .then(metrics => {
    console.log(metrics)
  })
  .catch(e => {
    console.log(e)
  })

Async/Await Example

const SiteData = require("sitedata")
const sitedata = new SiteData({ token: "YOUR_API_TOKEN" })

;(async function() {
  try {
    const metric = await sitedata.metric.index({ url: "example.com" })
    console.log(metric)
  } catch(e) {
    console.log(e)
  }
})()

Tests

To run the test suite, first install the dependencies, then run npm test:

$ npm install
$ npm test
2.0.0

6 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.3

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago