create account

Building an Android App for Steemit by razem-io

View this thread on: hive.blogpeakd.comecency.com
· @razem-io · (edited)
$3.33
Building an Android App for Steemit
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.
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorrazem-io
permlinkbuilding-an-android-app-for-steemit
categoryandroid
json_metadata{"tags":["android","app","steemit","development","dev","tutorial","documentation"]}
created2016-07-16 07:10:42
last_update2016-07-16 07:15:39
depth0
children8
last_payout2016-08-17 10:29:03
cashout_time1969-12-31 23:59:59
total_payout_value2.873 HBD
curator_payout_value0.456 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length5,582
author_reputation53,217,547,712
root_title"Building an Android App for Steemit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id131,922
net_rshares1,545,889,604,095
author_curate_reward""
vote details (61)
@auxon ·
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
👍  
properties (23)
authorauxon
permlinkre-razem-io-building-an-android-app-for-steemit-20160725t210738993z
categoryandroid
json_metadata{"tags":["android"]}
created2016-07-25 21:07:39
last_update2016-07-25 21:07:39
depth1
children0
last_payout2016-08-17 10:29:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length172
author_reputation585,484,586,007
root_title"Building an Android App for Steemit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id357,461
net_rshares469,402,972
author_curate_reward""
vote details (1)
@bycz ·
if you need help. i'm available.
👍  
properties (23)
authorbycz
permlinkre-razem-io-building-an-android-app-for-steemit-20160716t071350206z
categoryandroid
json_metadata{"tags":["android"]}
created2016-07-16 07:13:54
last_update2016-07-16 07:13:54
depth1
children1
last_payout2016-08-17 10:29:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length32
author_reputation5,674,465,420,480
root_title"Building an Android App for Steemit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id131,962
net_rshares437,006,372
author_curate_reward""
vote details (1)
@razem-io · (edited)
Thanks! I will setup a github repository soon where anybody can contribute.  Would be great to see you there.
properties (22)
authorrazem-io
permlinkre-bycz-re-razem-io-building-an-android-app-for-steemit-20160716t072613951z
categoryandroid
json_metadata{"tags":["android"]}
created2016-07-16 07:26:18
last_update2016-07-16 07:26:33
depth2
children0
last_payout2016-08-17 10:29:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length109
author_reputation53,217,547,712
root_title"Building an Android App for Steemit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id132,083
net_rshares0
@deeprocks ·
Thanks!! And I hope we get an app soon!!
properties (22)
authordeeprocks
permlinkre-razem-io-building-an-android-app-for-steemit-20160716t071238663z
categoryandroid
json_metadata{"tags":["android"]}
created2016-07-16 07:12:42
last_update2016-07-16 07:12:42
depth1
children0
last_payout2016-08-17 10:29:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length40
author_reputation1,369,053,483,932
root_title"Building an Android App for Steemit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id131,946
net_rshares0
@kingjohal · (edited)
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
👍  , ,
properties (23)
authorkingjohal
permlinkre-razem-io-building-an-android-app-for-steemit-20160716t071254962z
categoryandroid
json_metadata{"tags":["android"],"links":["https://steemit.com/proposals/@kingjohal/steemstarter-campaign-steem-android-wallet-nfc-tap-and-pay-integration"]}
created2016-07-16 07:13:03
last_update2016-07-16 07:14:45
depth1
children1
last_payout2016-08-17 10:29:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length272
author_reputation1,890,429,767,653
root_title"Building an Android App for Steemit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id131,953
net_rshares3,365,544,291
author_curate_reward""
vote details (3)
@razem-io ·
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!
properties (22)
authorrazem-io
permlinkre-kingjohal-re-razem-io-building-an-android-app-for-steemit-20160716t072513109z
categoryandroid
json_metadata{"tags":["android"]}
created2016-07-16 07:25:15
last_update2016-07-16 07:25:15
depth2
children0
last_payout2016-08-17 10:29:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length158
author_reputation53,217,547,712
root_title"Building an Android App for Steemit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id132,076
net_rshares0
@kubiiktop ·
Good luck ;-)
properties (22)
authorkubiiktop
permlinkre-razem-io-building-an-android-app-for-steemit-20160716t071806854z
categoryandroid
json_metadata{"tags":["android"]}
created2016-07-16 07:18:06
last_update2016-07-16 07:18:06
depth1
children0
last_payout2016-08-17 10:29:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length13
author_reputation317,840,210
root_title"Building an Android App for Steemit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id132,021
net_rshares0
@shredlord ·
Can't wait. Looking great so far
properties (22)
authorshredlord
permlinkre-razem-io-building-an-android-app-for-steemit-20160716t071145047z
categoryandroid
json_metadata{"tags":["android"]}
created2016-07-16 07:11:48
last_update2016-07-16 07:11:48
depth1
children0
last_payout2016-08-17 10:29:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length32
author_reputation13,640,901,747,017
root_title"Building an Android App for Steemit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id131,936
net_rshares0