Skip to content
This repository has been archived by the owner on Mar 21, 2021. It is now read-only.

rochnyak-d-i/rdi-yandex-turbo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rdi-yandex-turbo

Installation

npm i rdi-yandex-turbo

Usage

const YandexTurbo = require('rdi-yandex-turbo');
const service = new YandexTurbo({
  key: 'The authorization token',
  userId: 'User id',
  hostID: 'Host:id:80',
  mode: 'PRODUCTION', // or 'DEBUG'
  logger: console
});

First run

Need to pass the verification procedure.

const ok = await service.verify(
  'http://my.host',
  '/path/to/public/dir/for/create/verify/file'
);

if (ok) {
  // save this to config
  this.userID
  this.hostID
}

Send RSS

const fsReadStream = fs.createReadStream('/path/to/turbo-rss.xml');

await service.turbo.sendRSS(fsReadStream, {gzip: false});

About

send rss to yandex-turbo service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published