As some of you already know we are going to include the SCOT Tribes (of which PALnet is the most known) in SteemPeak. With the next release PALnet and Splintertalk will be available and others can be enabled talking directly to the tribe owner and the Steem Engine team.
I'm not going to explain in this post what a Tribe is, check the blogs by
or
to read more about Scotbot and tribes.
The first important decision we took was to integrate the tribes directly into the website, so don't expect a new website for each tribe as you may have seen with palnet.io and splintertalk.io. This is what we think is the best approach to enjoy both the new tribes and the standard Steem features, but required some work to allow the rewards to be displayed in the standard pages.
Keep reading to find out how these rewards are loaded and to get a quick preview of what wil be available in the next release.
SCOT Rewards included in the standard Feeds
Read other posts in the series HERE
If you have used the Steem API before you know that for most pages one of the following API are used:
getDiscussionsByFeed
getDiscussionsByBlog
getDiscussionsByTrending
getDiscussionsByCreated
Of course those API include only standard Steem details. To load additional SCOT rewards another call is required and fortunately it is pretty straightforward:
https://scot-api.steem-engine.com/@author/permlink
We don't need to do this call on each posts fetched in the feed, but only for posts having one (or more) of the correct tags to be processed by Scotbot (at the time of this post only palnet, spt and splintertalk).
This calls returns all the details available for a post in the Scot instance. For example with this call https://scot-api.steem-engine.com/@asgarth/on-the-way-back-home you'll get the following result (I removed some parts to make it easier to read):
{
"PAL":{
"active_votes":[...],
"app":"steempeak/1.12.2",
"author":"asgarth",
"author_curve_exponent":1.05,
"authorperm":"@asgarth/on-the-way-back-home",
"beneficiaries_payout_value":0,
"block":33975537,
"cashout_time":"2019-06-27T21:43:48",
"children":1,
"created":"2019-06-20T21:43:48",
"curator_payout_value":0,
"decline_payout":false,
"desc":"As some of you may have noticed I'm trying to post more consistently...",
"json_metadata":"{\"app\": \"steempeak/1.12.2\", , ...}",
"last_payout":"1970-01-01T00:00:00",
"last_update":"2019-06-25T19:19:19",
"main_post":true,
"pending_token":1440,
"precision":3,
"promoted":0,
"score_hot":156109.0,
"score_trend":3254.84,
"tags":"photofeed,palnet,steempeak,photography,cityscape",
"title":"On The Way Back Home",
"token":"PAL",
"total_payout_value":0,
"total_vote_weight":0,
"vote_rshares":4294022
}
}
After parsing and attaching those information to the post retrieved with the Steem API we have everything required to display the additional rewards details on the post payout.
Considering that multiple tokens can be associated with a single post and that the space available in the post footer is quite limited I added a small icon indicating the additional rewards and moved all the additional details in the tooltip.
This is a preview of the payout of one of my recent posts having both Steem and PAL.
I hope you like it and that you'll find it useful. Of course there will be other pages included in the next release related to the Tribes, but for this post I think to have already shown enough :D
As always feedback and suggestion are much appreciated, both in the comments or on our Discord ;)
Sergio