Steevie - New features, Trending, Account posts, Fix notifications Update 0.2.0 [Repost]

in #utopian-io5 years ago

Repository

https://github.com/gigatoride/steevie

Telegram bot

https://telegram.me/SteevieBot

logotype.png

New Features

Commit

New Command for Account Posts

This is a new command for viewing all account posts with paginating feature (next/previous)

steevie_myposts.gif

I've used the following utility for paginating that manage the whole operation

  paginate: (array, pageSize, pageNumber) => {
    --pageNumber;
    return array.slice(pageNumber * pageSize, (pageNumber + 1) * pageSize);
  }

Then the following code for main variables

const currentPage = opts.currentPage || 1; // default for front-end
const pageSize = 6; // posts per page
const totalPages = Math.ceil(buttons.length / pageSize); // rounds the page number up to the next largest whole number or integer
let currentPagePosts = paginate(buttons, pageSize, currentPage);

New Command for Trending

A new command for viewing Steem trending posts with support for all tags. and also suggests the top 5 tags.

steevie_trending.gif

The following code for callback buttons that suggests top tags

steem.api.getTrendingTags(null, limit, (err, result)=>{
// Callback buttons
})

Then after validating the user input

It callbacks a url buttons using map method in javascript

steem.api.getDiscussionsByTrending(query, (err, result) => {
  // Callback url buttons using map method
});

Fix notfications

Recently an issue that made notifications not functioning properly with caused by 3rd-party dependency which is steem-js I've replaced it with an event-driven library for better notification handling and stable performance

 stream.on('transaction:transfer', (type, data) => {
 // Analysis the streamed data
// Push to subscribed user
 });

GitHub Account

https://github.com/gigatoride

Sort:  

#utopian-io has been a gift. We would like to keep its curation-efforts alive here on 'marlians.com'. We want to curate and reward 'contributions to open-source projects' with MARLIANS on the the marlians.com tribe, a SCOT-enabled steem condenser. Contributions can include suggestions, graphics, bug-finds, code etc. You can simply add in #marlians to your #utopian-io posts and it will appear on https://www.marlians.com/created/utopian enabling you to earn some MARLIANS along with steem/sbd. You can also post directly to steem via 'marlians.com'. We have some overseers who curate and who can render you help too. You can find them enlisted on https://www.marlians.com/created/utopian

On the side, i wonder if you may have time for some open tasks related to marlians.com. There are few open and simple tasks

Congratulations @gigatoride! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.21
TRX 0.20
JST 0.034
BTC 91022.78
ETH 3148.10
USDT 1.00
SBD 2.96