Open 0x62 opened 7 years ago
As a temporary fix, below is a transpiled version of example.js
, which works out of the box:
'use strict';
var _index = require('../index');
var _index2 = _interopRequireDefault(_index);
var _dotenv = require('dotenv');
var _dotenv2 = _interopRequireDefault(_dotenv);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
_dotenv2.default.config();
var username = process.env.username;
var password = process.env.password;
// bot.auth(username, password)
// .then((headers) => bot.setLike(headers, '1157751993106715465_5932067'));
//
// bot.auth(username, password)
// .then((headers) => bot.setComment(headers, '1156408808103072490_518286907', 'somehow this comment must be ignored, i guess!'));
//
// bot.auth(username, password)
// .then((headers) => bot.unsetFollow(headers, '29738951'));
//
// bot.auth(username, password)
// .then((headers) => bot.setFollow(headers, '29738951'));
//
_index2.default.auth(username, password).then(function (headers) {
return _index2.default.getFeedByHashtag(headers, 'cats');
}).then(function (res) {
return console.log(res);
});
As per example:
If I install
babel-cli
before running: