项目作者: TeamMalaysia

项目描述 :
An NPM Library for making upvote bot that upvotes quality content
高级语言: JavaScript
项目地址: git://github.com/TeamMalaysia/steem-upvote-util.git
创建时间: 2018-02-11T05:03:59Z
项目社区:https://github.com/TeamMalaysia/steem-upvote-util

开源协议:MIT License

下载


UpvoteBot for Teammalaysia

Bot that contains function for upvoting quality content on steem blog.

Quality check

  • Make sure content is not plagiarize. (by cheetah bot)
  • Make sure post is not too old.
  • Make sure post is not too short. Upvote weightage scale with length of post.

Installation

npm install --save steem-upvote-util or yarn add steem-upvote-util

Usage

CommonJS

Get data of a post

code
  1. const util = require('steem-upvote-util');
  2. const author = 'superoo7';
  3. const permlink = 'gopro-hero-6-2018-02-13-09-33-41';
  4. const config = {
  5. maximumPostAge: 302400000, // 3.5 days
  6. minimumPostAge: 1800000, // 30 minutes
  7. minimumLength: 250, // 250 characters
  8. optimumLength: 4000 // 4000 characters
  9. };
  10. util.main(author, permlink, config).then(data => console.log(data));
result
  • If okay
  1. {
  2. time: 'a day ago',
  3. weightage: 1188,
  4. author: 'superoo7',
  5. permlink: 'gopro-hero-6-2018-02-13-09-33-41',
  6. msg: 'The post is created a day ago and will be upvoted by 11.88%'
  7. }
  • If voted by cheetah
  1. { msg: 'CHEETAH' }
  • if post too old
  1. { msg: 'OLD_POST' }
  • if post not found
  1. { msg: 'POST_NOT_FOUND' }

Upvote

code
  1. const util = require('steem-upvote-util');
  2. const author = 'superoo7';
  3. const permlink = 'gopro-hero-6-2018-02-13-09-33-41';
  4. const weightage = 50 * 100;
  5. util.upvote('STEEM_POSTING_KEY', 'STEEM_USERNAME', author, permlink, weightage)
  6. .then(data => {
  7. if (data === 'ERROR') {
  8. console.log('unable to upvote');
  9. } else {
  10. console.log('upvoted');
  11. }
  12. });

LICENSE

MIT