SEO Logs API: Node.js Client
Node.js client for SEO Logs API.
Installation
npm install seologs-api
Usage
The api token is required to connect to SEO Logs api, provide it as environment variables like so:
process.env.SEOLOGS_API_TOKEN = 'YOUR_TOKEN';
const seologs = require('seologs-api')();
Alternatively pass them in as function arguments:
const seologs = require('seologs-api')('YOUR_TOKEN');
Then use the client, example:
seologs.project.getProject(YOUR_PROJECT_ID)
.then(function (jsonResult) {
// success..
})
.catch(function (err) {
// failed...
});
Test
Run the following command:
npm test
Documentation
Build
Run the following command:
npm run docs