Ok, so I am going to cover some of the calls using steem-js. Where possible I will give better examples than in the github examples and I will also show samples of what you will get back. I want to start with getDiscussions type calls because for anyone first trying to read the docs the query parameter is a bit vague. ``` Steem.api.getDiscussionsByActive(query, function(err, result) { console.log(err, result); }); ``` Query takes the following form ``` var query = { limit:10, // limits the number of posts returned tag: 'funny', // limits posts returned to those with the tag funny truncate_body: 0 // limits the number of bytes or body text returned for // each post. 0 returns the whole thing and is the default if you don't include this parameter }; ``` There are still some mysteries to me with this call. You can leave off the tag and the truncate_body and it works as expected but if you leave off the limit you get an empty array as a result and null for the err object. I will dig around some more and see if I can figure out what happens in the code that causes this and if I find anything I will either include it in the next post or update this one. Also, 100 is the highest limit you can set for this call before it throws an error. I made another discover which is tag does not always actually mean tag. The following ``` Steem.api.getDiscussionsByFeed({ //author: 'voorash', limit:10, tag: 'voorash',} ``` will return the latest 10 items in my feed. So it would seem tag has been repurposed for some calls. This next one took me a bit to figure out because it doesn't return the same value. I honestly can't even imagine what this is used for unless I am missing something. Calling it will return the posts being cashed out right now. Not in 10 seconds and not 10 seconds ago. ``` Steem.api.getDiscussionsByCashout({limit:10} ``` I thought it was broken until it finally returned something. I'll tinker around with this one to see if I can figure out if it could ever be useful. One last one for tonight and that is because it shows some odd behavior. If I run this without a tag then it lists posts that currently have the most votes. If I add the tag photography then the first result is from 03/15/2017 at 08:32 but then all the other posts in the returned values are current. I will have to look into that one some more too. ``` Steem.api.getDiscussionsByVotes({limit:10} ``` That is it for tonight but I am going to try to post more on this tomorrow. Once I have a good grasp of each api I plan to submit a pull request to add examples to github. I'll leave you with my reinterpretation of the new star wars short animation style. With Bizarro Leia.
author | voorash |
---|---|
permlink | new-steem-dev-series-3 |
category | steemdev |
json_metadata | {"tags":["steemdev","steemit","dev","tutorial","steem"],"image":["https://steemitimages.com/DQmZweT7DoAAQGZ2Ya4dexNkHzXy6oQNb1C7wMppJCeMdnB/bizzarroholdewok.jpg"],"app":"steemit/0.1","format":"markdown"} |
created | 2017-08-14 06:42:18 |
last_update | 2017-08-14 08:32:36 |
depth | 0 |
children | 8 |
last_payout | 2017-08-21 06:42:18 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 24.244 HBD |
curator_payout_value | 7.280 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 2,873 |
author_reputation | 2,389,786,777,503 |
root_title | "New steem dev series - #3 - Learn what the query parameter in getDiscussion calls" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 11,753,444 |
net_rshares | 9,614,189,306,339 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
pharesim | 0 | 114,717,066,478 | 0.02% | ||
venuspcs | 0 | 2,048,584,854 | 1% | ||
hitmeasap | 0 | 205,210,078 | 1% | ||
elyaque | 0 | 6,993,269,659 | 0.1% | ||
endaksi1 | 0 | 304,565,047 | 1% | ||
edrivegom | 0 | 248,926,938 | 0.1% | ||
transisto | 0 | 9,298,691,363,730 | 100% | ||
konti | 0 | 440,921,123 | 1% | ||
mondeja | 0 | 157,573,944 | 1% | ||
cryptoninja | 0 | 84,500,221 | 0.8% | ||
stephen.king989 | 0 | 1,086,212,831 | 0.2% | ||
netaterra | 0 | 10,290,689,564 | 100% | ||
anarcho-andrei | 0 | 2,196,641,078 | 0.1% | ||
shadowspub | 0 | 1,117,084,805 | 1% | ||
tjtrusty | 0 | 146,891,076 | 1% | ||
allyouneedtoknow | 0 | 717,024,241 | 0.5% | ||
jhermanbeans | 0 | 399,634,922 | 0.1% | ||
worldtraveler | 0 | 138,373,070 | 0.2% | ||
samanthabonin | 0 | 989,410,402 | 2% | ||
starrkravenmaf | 0 | 227,339,687 | 0.3% | ||
chanthasam | 0 | 3,250,988,951 | 12% | ||
steemprentice | 0 | 1,293,758,394 | 0.1% | ||
dammylohar | 0 | 52,730,584 | 1% | ||
lastminuteman | 0 | 3,168,076,099 | 0.4% | ||
ogochukwu | 0 | 853,161,754 | 0.1% | ||
pomperipossa | 0 | 314,842,200 | 0.1% | ||
libertylol | 0 | 129,316,491 | 0.1% | ||
manandezo | 0 | 185,890,445 | 1% | ||
sixexgames | 0 | 125,308,656 | 1% | ||
banjo | 0 | 275,660,270 | 1% | ||
singa | 0 | 78,201,414 | 0.1% | ||
numpypython | 0 | 108,036,778 | 0.1% | ||
jhagi.bhai | 0 | 89,080,676 | 0.1% | ||
gindor | 0 | 397,088,579 | 0.2% | ||
abcdoctor | 0 | 188,137,519 | 1% | ||
whatamidoing | 0 | 130,748,337 | 0.1% | ||
shawnfishbit | 0 | 620,212,149 | 0.1% | ||
oroger | 0 | 5,996,430,868 | 100% | ||
beng05 | 0 | 165,429,708 | 1% | ||
nerdylab | 0 | 2,129,934,026 | 100% | ||
timbalabuch | 0 | 101,480,484 | 1% | ||
jotmax | 0 | 66,626,891 | 1% | ||
qwasert | 0 | 108,648,042 | 0.2% | ||
taica | 0 | 146,580,036 | 0.1% | ||
fatpandadesign | 0 | 84,526,627 | 0.1% | ||
rycharde | 0 | 231,280,895 | 0.2% | ||
pusteblume | 0 | 429,049,686 | 1% | ||
cryptohustler | 0 | 182,168,989 | 1% | ||
davidk | 0 | 2,464,166,762 | 100% | ||
kimminyoung | 0 | 20,740,693,436 | 33% | ||
minnowsupport | 0 | 52,072,640,725 | 1% | ||
tinashe | 0 | 487,155,882 | 1% | ||
burnedpixel | 0 | 152,496,348 | 0.2% | ||
andrewgenaille | 0 | 144,108,488 | 0.2% | ||
n1kofi | 0 | 498,088,141 | 1% | ||
ch00fy | 0 | 379,614,380 | 1% | ||
sol25 | 0 | 85,833,998 | 0.2% | ||
stella87s | 0 | 74,025,630 | 1% | ||
moomoo | 0 | 4,976,645,815 | 100% | ||
paulag | 0 | 138,268,104 | 1% | ||
jfollas | 0 | 11,453,715,754 | 50% | ||
myday | 0 | 154,504,812 | 0.1% | ||
gamerveda | 0 | 697,268,924 | 0.5% | ||
markfitzgerald | 0 | 251,554,814 | 1% | ||
pilcrow | 0 | 26,199,869,983 | 50.51% | ||
nesbitt | 0 | 79,806,822 | 1% | ||
bluchr | 0 | 90,578,833 | 0.2% | ||
glex | 0 | 70,525,132 | 0.1% | ||
eyegasm | 0 | 379,231,790 | 1% | ||
aaalejandro | 0 | 545,177,600 | 100% | ||
blackserpent | 0 | 1,520,349,269 | 100% | ||
resiliencia | 0 | 110,006,642 | 0.6% | ||
larrybishop | 0 | 597,836,800 | 100% | ||
voorash | 0 | 24,626,341,590 | 100% | ||
mianfahad | 0 | 58,570,673 | 100% | ||
arunad | 0 | 405,881,193 | 100% | ||
nurhasib | 0 | 140,720,554 | 100% | ||
loka4qpons | 0 | 623,153,878 | 100% | ||
free999enigma | 0 | 161,815,053 | 100% | ||
geeekgirl | 0 | 607,170,066 | 100% | ||
gameoutcome | 0 | 1,096,809,152 | 100% | ||
mgpeng | 0 | 0 | 100% |
Interesting post ! Thanks for sharing ! Upvoted from @chanthasam
author | chanthasam |
---|---|
permlink | re-voorash-new-steem-dev-series-3-20170814t064425148z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"users":["chanthasam"],"app":"steemit/0.1"} |
created | 2017-08-14 06:44:27 |
last_update | 2017-08-14 06:44:27 |
depth | 1 |
children | 0 |
last_payout | 2017-08-21 06:44:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 64 |
author_reputation | 16,524,088,963,858 |
root_title | "New steem dev series - #3 - Learn what the query parameter in getDiscussion calls" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 11,753,584 |
net_rshares | -124,814,649,177 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
transisto | 0 | -124,814,649,177 | -1% |
Dude, thanks god for this! Official documentation is leaving me clueless on what to put into query-variable and how to filter posts... Followed! Please make more :)
author | igster |
---|---|
permlink | re-voorash-new-steem-dev-series-3-20170830t001745374z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1"} |
created | 2017-08-30 00:17:45 |
last_update | 2017-08-30 00:18:03 |
depth | 1 |
children | 2 |
last_payout | 2017-09-06 00:17:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 165 |
author_reputation | 17,415,198,441,969 |
root_title | "New steem dev series - #3 - Learn what the query parameter in getDiscussion calls" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 13,285,398 |
net_rshares | 0 |
I will be making more. I have been very busy on a couple things but I have plans for future posts.
author | voorash |
---|---|
permlink | re-igster-re-voorash-new-steem-dev-series-3-20170830t030836588z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1"} |
created | 2017-08-30 03:08:36 |
last_update | 2017-08-30 03:08:36 |
depth | 2 |
children | 1 |
last_payout | 2017-09-06 03:08:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.104 HBD |
curator_payout_value | 0.034 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 99 |
author_reputation | 2,389,786,777,503 |
root_title | "New steem dev series - #3 - Learn what the query parameter in getDiscussion calls" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 13,296,596 |
net_rshares | 41,238,379,532 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
voorash | 0 | 41,238,379,532 | 100% |
meep
author | ionlysaymeep |
---|---|
permlink | re-voorash-re-igster-re-voorash-new-steem-dev-series-3-20170830t030836588z-20170830t034832074z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"meep_bot/0.0.1"} |
created | 2017-08-30 03:48:33 |
last_update | 2017-08-30 03:48:33 |
depth | 3 |
children | 0 |
last_payout | 2017-09-06 03:48:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 4 |
author_reputation | 754,962,855,156 |
root_title | "New steem dev series - #3 - Learn what the query parameter in getDiscussion calls" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 13,299,188 |
net_rshares | 0 |
wow some new in post i like post....thanks
author | jigs3716 |
---|---|
permlink | re-voorash-new-steem-dev-series-3-20170814t080425058z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1"} |
created | 2017-08-14 08:04:30 |
last_update | 2017-08-14 08:04:30 |
depth | 1 |
children | 0 |
last_payout | 2017-08-21 08:04:30 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 42 |
author_reputation | 115,600,210,863 |
root_title | "New steem dev series - #3 - Learn what the query parameter in getDiscussion calls" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 11,758,382 |
net_rshares | 0 |
Nice post....... i upvoted your post plz upvote me back!!
author | mianfahad |
---|---|
permlink | re-voorash-new-steem-dev-series-3-20170814t071345416z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1"} |
created | 2017-08-14 07:13:48 |
last_update | 2017-08-14 07:13:48 |
depth | 1 |
children | 0 |
last_payout | 2017-08-21 07:13:48 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 57 |
author_reputation | -548,955,562,576 |
root_title | "New steem dev series - #3 - Learn what the query parameter in getDiscussion calls" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 11,755,376 |
net_rshares | -2,339,502,451 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
voorash | 0 | -2,339,502,451 | -10% |
<p>Congratulations! This post has been upvoted from the communal account, @minnowsupport, by Voorash from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, someguy123, neoxian, followbtcnews/crimsonclad, and netuoso. The goal is to help Steemit grow by supporting Minnows and creating a social network. Please find us in the <a href="https://discord.gg/HYj4yvw">Peace, Abundance, and Liberty Network (PALnet) Discord Channel</a>. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.</p>
author | minnowsupport |
---|---|
permlink | re-voorash-new-steem-dev-series-3-20170814t072333685z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"cosgrove/0.0.1rc3"} |
created | 2017-08-14 07:23:33 |
last_update | 2017-08-14 07:23:33 |
depth | 1 |
children | 0 |
last_payout | 2017-08-21 07:23:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 608 |
author_reputation | 148,902,805,319,183 |
root_title | "New steem dev series - #3 - Learn what the query parameter in getDiscussion calls" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 11,755,989 |
net_rshares | 0 |
Hey man, just a small tip. If you put in the title what your post is about it's a lot easier for people to see if they want to read it, and also easier to find back if someone wants to remember how to do the things you explain. Great post by the way, thanks for starting this new series.
author | pilcrow | ||||||
---|---|---|---|---|---|---|---|
permlink | re-voorash-2017814t94022810z | ||||||
category | steemdev | ||||||
json_metadata | {"tags":"steemdev","app":"esteem/1.4.6","format":"markdown+html","community":"esteem"} | ||||||
created | 2017-08-14 07:40:24 | ||||||
last_update | 2017-08-14 07:40:24 | ||||||
depth | 1 | ||||||
children | 0 | ||||||
last_payout | 2017-08-21 07:40:24 | ||||||
cashout_time | 1969-12-31 23:59:59 | ||||||
total_payout_value | 0.387 HBD | ||||||
curator_payout_value | 0.011 HBD | ||||||
pending_payout_value | 0.000 HBD | ||||||
promoted | 0.000 HBD | ||||||
body_length | 288 | ||||||
author_reputation | 2,531,070,549,481 | ||||||
root_title | "New steem dev series - #3 - Learn what the query parameter in getDiscussion calls" | ||||||
beneficiaries |
| ||||||
max_accepted_payout | 1,000,000.000 HBD | ||||||
percent_hbd | 10,000 | ||||||
post_id | 11,756,931 | ||||||
net_rshares | 127,838,546,807 | ||||||
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
good-karma | 0 | 101,977,906,297 | 0.5% | ||
mondeja | 0 | 157,573,944 | 0.5% | ||
swisswatcher | 0 | 2,016,393,783 | 0.5% | ||
luismy | 0 | 102,696,988 | 0.5% | ||
sellergenius | 0 | 100,290,416 | 0.5% | ||
meysam | 0 | 747,511,900 | 0.25% | ||
gokulramdas | 0 | 79,939,216 | 0.5% | ||
voorash | 0 | 22,656,234,263 | 100% |