Steevie - New features, Trending, Account posts, Fix notifications Update 0.2.0 [Repost]
Repository
https://github.com/gigatoride/steevie
Telegram bot
https://telegram.me/SteevieBot
New Features
New Command for Account Posts
This is a new command for viewing all account posts with paginating feature (next/previous)
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.
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
});
Hey, @gigatoride!
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!
Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).
Want to chat? Join us on Discord https://discord.gg/h52nFrV.
Vote for Utopian Witness!
#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!
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!