Hello Community,
This is my first post [Yeah]. I am a Java / Scala developer and would like to build a quick and dirty open source android prototype APP which displays the current discussions by trending, created, active, cashout, payout, votes, children and hot.
While I was trying to find a documentation I realized that there is basically none for the API. Thanks to steem being open source it is possible to understand the API without the need of a documentation. That is why I would like to share with you how I can recieve the data I described above. Perhaps it helps someone to build awesome software for steemit.
To get updates on the app just follow my account. I will post updates as soon as there is something to show.
Let's get rolling! Use an open rpc websocket endpoint like wss://this.piston.rocks
or start steemd
daemon with a rpc-endpoint defined:
./programs/steemd/steemd --rpc-endpoint=127.0.0.1:8092
Now you can communicate with port 8092 by using the RPC-JSON protocol or connect to a websocket and only send the data portion of the curl command.
Here is an example on how to get the trending discussions/posts:
curl http://127.0.0.1:8092 --data '{"jsonrpc": "2.0", "method": "get_discussions_by_trending", "params": [{"tag": "", "limit": 10, "filter_tags": []}], "id": 1}'
which returns in all cases a json array of discussions:
{
"id": 1,
"result": [{
"id": "2.8.91509",
"author": "guerrint",
"permlink": "the-first-steemit-makeup-turtorial-bringing-youtubers-to-steemit",
"category": "beauty",
"parent_author": "",
"parent_permlink": "beauty",
"title": "THE FIRST STEEMIT MAKEUP TUTORIAL- bringing Youtubers to Steemit!! Tara is back!",
"body": "![]I am beyond excited to share with you Steemit’s FIRST makeup tutorial. I've been planning really hard to make this video perfect for you, so I hope you all enjoy it! Please give me some feedback in the comment section and any suggestions you might have for future videos.\n \nI did a “Full Face” everyday makeup look for the very first video. I have a lot of ideas for tutorials that I really think everyone will love. Coming soon is a review of false eyelashes, the magic of hair extensions, the perfect date night outfit, how to make your own makeup, AND SO MUCH MORE!- I really can’t wait to start blogging about these fun topics!\n \nUnder my video on Youtube, I made a little explanation about Steemit and my success in hopes of spreading the word about this amazing world that I’ve been obsessing about. I’m not sure how well it’ll work, but I think it will spark some interest and get more people onto the website to join in on the fun!\n \nHERE IT IS! \n\nhttps://youtu.be/OfMZ2IgBEXU\n\n\nProducts:\nFoundation- Laura Mercier in Sand Beige w/ Mac Brush 159\nEyebrows- Anastasia Brow Pomade in Dark Brown w/ Anastasia Brush\nEyeshadow- Urban Decay Naked3 in Nooner and Factory\nEyelinder- Mac in Smulder\nHighlighter- Mac Prep + Prime in Bright Forecast w/ Mac 159 Brush\nPowder- Laura Mercier Secret Brightening Powder w/ Mac 187 Brush\nBronzer- Chanel in Soleil Tan w/ Mac 130 Brush\nLipliner- Mac in Subculture\nLipstick- Mac in Velvet Teddy\nBlush- Mac in Sincere and Prism\nMascara- Diorshow in 090\nBrow Mascara- Anastasia in Espresso\n\n#girlpower #steemit #taraisback #tara #makeup #beauty #mac #steemwatch #marketing",
"json_metadata": "{\"tags\":[\"beauty\",\"steemwatch\",\"girlpower\",\"makeup\"],\"links\":[]}",
"last_update": "2016-07-16T00:07:51",
"created": "2016-07-15T22:06:54",
"active": "2016-07-16T06:48:48",
"last_payout": "1970-01-01T00:00:00",
"depth": 0,
"children": 88,
"children_rshares2": "51547204152523609388340062305",
"net_rshares": "209802880055212",
"abs_rshares": "209803638079142",
"vote_rshares": "209803377716274",
"children_abs_rshares": "408675701599642",
"cashout_time": "2016-07-17T03:31:24",
"max_cashout_time": "2016-07-29T22:06:54",
"total_vote_weight": "18101627237572651700",
"total_payout_value": "0.000 SBD",
"curator_payout_value": "0.000 SBD",
"author_rewards": 0,
"net_votes": 352,
"root_comment": "2.8.91509",
"max_accepted_payout": "1000000.000 SBD",
"percent_steem_dollars": 10000,
"allow_replies": true,
"allow_votes": true,
"allow_curation_rewards": true,
"url": "/beauty/@guerrint/the-first-steemit-makeup-turtorial-bringing-youtubers-to-steemit",
"root_title": "THE FIRST STEEMIT MAKEUP TUTORIAL- bringing Youtubers to Steemit!! Tara is back!",
"pending_payout_value": "7470.872 SBD",
"total_pending_payout_value": "8585.220 SBD",
"active_votes": [{
"voter": "dantheman",
"weight": "1051168382814596049",
"rshares": "20771352305214",
"percent": 10000,
"time": "2016-07-16T00:07:42"
}, {
"voter": "steempty",
"weight": "13337072589517270",
"rshares": "7452572930485",
"percent": 10000,
"time": "2016-07-16T06:02:24"
}, {
"voter": "smooth",
"weight": "132362101854883620",
"rshares": "32508053408946",
"percent": 10000,
"time": "2016-07-16T00:49:36"
}, <AND SO ON> ...],
"replies": []
}]
}
Other methods names are:
- get_discussions_by_trending
- get_discussions_by_created
- get_discussions_by_active
- get_discussions_by_cashout
- get_discussions_by_payout
- get_discussions_by_votes
- get_discussions_by_children
- get_discussions_by_hot
That's already all there is to know in order to recieve the data needed for that app. Now it is time to setup the Android SDK and build the first HelloWorld APP which will later be transformed into the steemit Android APP.
Solid work. I am currently hiring people to help work on another STEEMIT app if you are interested sir please check out my post. Thank you. Upvoted your post.
https://steemit.com/proposals/@kingjohal/steemstarter-campaign-steem-android-wallet-nfc-tap-and-pay-integration
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Interesting! Currently I am employed so my time is very limited but perhaps I can help with some aspects of the app/platform. Fell free to contact me anytime!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
If you are using your own steemd server, then make sure to enable the tags plugin in the config.ini. I.E. change it to read: enable-plugin = witness account_history tags
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
if you need help. i'm available.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thanks! I will setup a github repository soon where anybody can contribute. Would be great to see you there.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Can't wait. Looking great so far
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thanks!! And I hope we get an app soon!!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Good luck ;-)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit