[Steemit Beta](https://beta.steemit.com/) is running for a while, hosting the new communities UI, powered by Hivemind in the backend. There is a new set of [API endpoints](https://github.com/steemit/hivemind/blob/214-core/hive/server/serve.py#L115) available. <center><img src="https://i.imgur.com/XcssYgI.png"></center> *** It's possible to use these endpoints with [Lightsteem](https://lightsteem.readthedocs.io/en/latest/) in a simple way to explore the API methods. (No updates needed thanks to Lightsteem's dynamic request model) #### First step, getting a Client instance *** ``` from lightsteem.client import Client c = Client(nodes=["https://beta-api.steemit.com/"]) ``` #### Get community details *** ``` c('bridge').get_community({"name": "hive-129924", "observer": "emrebeyler"}) ``` *** Example Output: ``` { 'id': 1352979, 'name': 'hive-129924', 'title': 'Python', 'about': 'news, questions, notes, tutorials about the Python programming language', 'lang': 'en', 'type_id': 1, 'is_nsfw': False, 'subscribers': 31, 'sum_pending': 28, 'num_pending': 16, 'num_authors': 9, 'created_at': '2020-01-04 09:11:06', 'context': { 'role': 'admin', 'title': '', 'subscribed': True }, 'description': '', 'flag_text': '', 'settings': {}, 'team': [ ['hive-129924', 'owner', ''], ['emrebeyler', 'admin', ''], ['crokkon', 'mod', 'Expert'] ] } ``` *** #### List communities *** ``` c('bridge').list_communities({"limit": 1}) ``` *** List all communities and limit the results to 1. (It's possible to paginate the results with optional ```last``` argument.) Example output: *** ``` [{ 'id': 1337319, 'name': 'hive-100421', 'title': 'Threespeak', 'about': '3Speak is a video platform for deplatformed and censored content creators.', 'lang': 'en', 'type_id': 1, 'is_nsfw': False, 'subscribers': 810, 'sum_pending': 2770, 'num_pending': 1912, 'num_authors': 461, 'created_at': '2019-11-14 19:51:54', 'context': {} }] ``` *** #### List community roles *** ``` c('bridge').list_community_roles({"community": "hive-129924"}) ``` *** Example output: *** ``` [ ['hive-129924', 'owner', ''], ['emrebeyler', 'admin', ''], ['crokkon', 'mod', 'Expert'] ] ``` *** #### List subscribers of a community *** ``` c('bridge').list_subscribers({"community": "hive-129924"}) ``` *** Example output: *** ``` [ ['cardboard', 'guest', None, '2020-01-05 01:17:51'], ['anthonyadavisii', 'guest', None, '2020-01-05 01:11:03'], ['mytechtrail', 'guest', None, '2020-01-05 00:52:39'], ['louis88', 'guest', None, '2020-01-05 00:50:18'], ['dalz', 'guest', '', '2020-01-05 00:45:21'], ['emrebeyler', 'admin', '', '2020-01-04 09:11:15'], ... ] ``` *** #### List subscriptions of an account *** ``` c('bridge').list_all_subscriptions({"account": "emrebeyler"}) ``` *** Example output: *** ``` [ ['hive-129924', 'Python'], ['hive-174578', 'OCD'], ['hive-167922', 'SteemLeo'], ['hive-136578', 'Steem Think Tank'], ['hive-177976', 'DCooperation'], ['hive-122359', 'Community Announce'], ['hive-185247', 'Open Source'] ] ``` *** #### Creating and managing communities All these transactions are actually Custom JSON transactions. [This](https://github.com/steemit/hivemind/blob/214-core/hive/indexer/community.py#L259) module will give an insight. Once things go out of the beta, I'll release a helper module in Lightsteem to make things easier. #### Note These API signatures may subject the change. GIT repository is a good place to track the changes if you're interested. #### Vote for my witness If you didn't vote already, consider casting a vote for my witness on [ Steemconnect](https://steemconnect.com/sign/account-witness-vote?witness=emrebeyler&approve=1) or on [Steemit](https://steemit.com/~witnesses) #### Python community *This is originally posted on [Python community](https://beta.steemit.com/trending/hive-129924) in [Steemit Beta](https://beta.steemit.com/trending/hive-129924).* Check it out and subscribe if you're interested in Python related content.
author | emrebeyler |
---|---|
permlink | exploring-new-hivemind-community-apis |
category | hive-129924 |
json_metadata | {"tags":["python","hivemind","communities","lightsteem","development"],"image":["https://i.imgur.com/XcssYgI.png"],"links":["https://beta.steemit.com/","https://github.com/steemit/hivemind/blob/214-core/hive/server/serve.py#L115","https://lightsteem.readthedocs.io/en/latest/","https://github.com/steemit/hivemind/blob/214-core/hive/indexer/community.py#L259","https://steemconnect.com/sign/account-witness-vote?witness=emrebeyler&approve=1","https://steemit.com/~witnesses","https://beta.steemit.com/trending/hive-129924"],"app":"steemit/0.2","format":"markdown"} |
created | 2020-01-14 21:21:45 |
last_update | 2020-01-14 21:21:45 |
depth | 0 |
children | 10 |
last_payout | 2020-01-21 21:21:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 7.373 HBD |
curator_payout_value | 6.860 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 4,189 |
author_reputation | 448,535,049,068,622 |
root_title | "Exploring new Hivemind Community APIs" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 0 |
post_id | 94,402,992 |
net_rshares | 50,385,569,238,474 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
gregory-f | 0 | 7,630,297,666 | 0.46% | ||
acidyo | 0 | 5,003,083,075,647 | 42% | ||
kevinwong | 0 | 1,254,246,865,806 | 14.7% | ||
gerber | 0 | 213,412,445,895 | 4% | ||
daan | 0 | 134,476,055,158 | 2% | ||
slowwalker | 0 | 339,926,163,117 | 5% | ||
yury-vas | 0 | 255,756,124,862 | 100% | ||
ausbitbank | 0 | 2,347,850,953,496 | 100% | ||
transisto | 0 | 58,163,999,365 | 100% | ||
jza | 0 | 0 | 100% | ||
inertia | 0 | 225,209,579,734 | 100% | ||
exyle | 0 | 362,429,491,776 | 4% | ||
felixxx | 0 | 602,337,085,938 | 100% | ||
oldstone | 0 | 267,029,643,406 | 5% | ||
maarnio | 0 | 248,442,172,810 | 53% | ||
barton26 | 0 | 21,482,461,756 | 100% | ||
decebal2dac | 0 | 8,100,423,396 | 100% | ||
cardboard | 0 | 19,800,842,134 | 100% | ||
anthonyadavisii | 0 | 325,117,001,415 | 100% | ||
rahul.stan | 0 | 1,608,428,134 | 21% | ||
erikaflynn | 0 | 4,925,322,094 | 12% | ||
borepstein | 0 | 59,396,730,076 | 100% | ||
shaunmza | 0 | 45,037,359,103 | 100% | ||
elviento | 0 | 6,544,842,169 | 7.01% | ||
lordneroo | 0 | 234,141,063,564 | 15% | ||
elevator09 | 0 | 22,005,353,674 | 10% | ||
rycharde | 0 | 1,230,226,782 | 2.8% | ||
mercadosaway | 0 | 1,544,387,606 | 100% | ||
ruel.cedeno | 0 | 4,670,129,002 | 100% | ||
steeminator3000 | 0 | 12,840,680,194 | 21% | ||
lastozgur | 0 | 5,086,040,295 | 100% | ||
techken | 0 | 0 | 0.28% | ||
firatozbek | 0 | 2,875,361,811 | 100% | ||
ludmila.kyriakou | 0 | 12,021,169,515 | 100% | ||
maitland | 0 | 0 | 100% | ||
jacekw | 0 | 42,055,364,032 | 100% | ||
crokkon | 0 | 60,810,223,040 | 100% | ||
accelerator | 0 | 37,640,921,966 | 2.8% | ||
joshman | 0 | 198,765,379,660 | 10% | ||
marceladb | 0 | 2,699,125,669 | 100% | ||
espoem | 0 | 11,379,148,385 | 5% | ||
msp-foundation | 0 | 162,042,252,538 | 100% | ||
isnochys | 0 | 30,957,206,234 | 28% | ||
apanamamama | 0 | 25,805,760,250 | 100% | ||
qurator | 0 | 93,661,914,723 | 0.77% | ||
murattatar | 0 | 1,478,787,308 | 20% | ||
sourovafrin | 0 | 46,071,232,149 | 20% | ||
blockbrothers | 0 | 56,824,487,334 | 2% | ||
malkoo45 | 0 | 115,447,645,196 | 100% | ||
favcau | 0 | 25,091,478,627 | 100% | ||
imisstheoldkanye | 0 | 2,661,949,496 | 1% | ||
unforgettable | 0 | 3,904,475,199 | 100% | ||
elchin | 0 | 693,751,013 | 100% | ||
emrebeyler | 0 | 488,990,020,881 | 100% | ||
seanlloyd | 0 | 184,973,815 | 1% | ||
not-a-bird | 0 | 10,503,765,480 | 50% | ||
freakerz | 0 | 1,294,823,680 | 100% | ||
evilest-fiend | 0 | 1,251,535,348 | 50% | ||
mytechtrail | 0 | 42,580,704,906 | 25% | ||
forkonti | 0 | 562,281,658 | 100% | ||
qustodian | 0 | 2,436,789,172 | 0.77% | ||
gokos | 0 | 553,516,019 | 100% | ||
berkerpeksag | 0 | 1,575,366,877 | 100% | ||
aydant | 0 | 805,817,675 | 100% | ||
intelligencer | 0 | 0 | 100% | ||
dmwh | 0 | 16,276,384,745 | 19% | ||
fourfourfun | 0 | 6,333,558,509 | 25% | ||
turkolog | 0 | 567,915,979 | 100% | ||
ataturk | 0 | 594,978,987 | 100% | ||
tinowhale | 0 | 3,021,644,010 | 49% | ||
hayirhah | 0 | 679,223,644 | 27.5% | ||
mstafford | 0 | 19,694,143,014 | 100% | ||
fromhell2sky | 0 | 9,623,109,408 | 24.5% | ||
leticiapereira | 0 | 1,798,248,724 | 100% | ||
ydavgonzalez | 0 | 1,217,322,426 | 100% | ||
baycan | 0 | 877,198,718 | 11% | ||
coinmeria | 0 | 762,219,852 | 35% | ||
googletr | 0 | 0 | 100% | ||
chorock | 0 | 108,591,520,398 | 10% | ||
cfminer | 0 | 557,308,041 | 100% | ||
muradovv | 0 | 63,617,848 | 5% | ||
uzerebru | 0 | 177,487,861 | 41% | ||
uzercanan | 0 | 307,293,496 | 45% | ||
cadawg | 0 | 12,158,149,225 | 2.8% | ||
raise-me-up | 0 | 0 | 0.01% | ||
ahmetmertugrul | 0 | 832,386,610 | 100% | ||
samedb | 0 | 553,333,588 | 100% | ||
photoholic | 0 | 261,214,594,606 | 5% | ||
tdogvoid | 0 | 571,824,177 | 100% | ||
agememnon | 0 | 1,418,470,296 | 49.5% | ||
tipitip | 0 | 797,464,541 | 100% | ||
ahmeterbay | 0 | 10,361,381,341 | 100% | ||
bozz | 0 | 2,545,036,202 | 1% | ||
thomasthewolf | 0 | 26,998,302,384 | 45% | ||
ruh | 0 | 813,850,679 | 100% | ||
isgledysduarte | 0 | 5,763,510,195 | 100% | ||
cunigarro | 0 | 2,620,082,375 | 100% | ||
bulent1976 | 0 | 651,989,108 | 100% | ||
lionsuit | 0 | 34,094,749,590 | 100% | ||
murti | 0 | 291,414,082 | 100% | ||
tolgahanuzun | 0 | 21,119,314,018 | 100% | ||
kabir88 | 0 | 181,039,161,303 | 51% | ||
bestboom | 0 | 11,779,709,564 | 4% | ||
muratkbesiroglu | 0 | 44,534,665,702 | 100% | ||
sereze | 0 | 9,046,494,502 | 100% | ||
kanrat | 0 | 29,105,722,730 | 100% | ||
run.vince.run | 0 | 9,637,110,706 | 50% | ||
springlining | 0 | 48,986,100,620 | 100% | ||
jaydih | 0 | 154,939,490,449 | 5% | ||
jensvoigt | 0 | 35,899,295,169 | 100% | ||
quuntziii | 0 | 6,048,468,964 | 100% | ||
jumbot | 0 | 30,963,637,823 | 55% | ||
sbi3 | 0 | 163,267,324,798 | 4.38% | ||
steem.observer | 0 | 168,261,461 | 100% | ||
kimseun | 0 | 31,711,495,498 | 5% | ||
wisdomandjustice | 0 | 259,370,753,510 | 5% | ||
blockchainstudio | 0 | 162,661,999,686 | 100% | ||
senseofhumor | 0 | 574,438,523 | 100% | ||
elvijsdzenitis | 0 | 827,065,943 | 100% | ||
frasier | 0 | 260,129,750 | 100% | ||
bilimkurgu | 0 | 19,871,235,109 | 100% | ||
hahajin | 0 | 0 | 100% | ||
witnessbot | 0 | 1,652,155,660 | 100% | ||
gtw | 0 | 72,457,428 | 100% | ||
kehrwoche | 0 | 2,300,578,371 | 100% | ||
kanadaramagi123 | 0 | 21,582,023,939 | 5% | ||
getup | 0 | 899,373,759 | 42% | ||
luciomcabee | 0 | 649,634,326 | 100% | ||
buildaminnow | 0 | 555,622,945 | 100% | ||
profitcheck | 0 | 10,278,878,710 | 100% | ||
loveecho | 0 | 4,634,760,616 | 5% | ||
pablorg94 | 0 | 601,207,227 | 100% | ||
contco | 0 | 422,847,215 | 100% | ||
hansgans | 0 | 30,446,612,366 | 100% | ||
swaze | 0 | 571,680,072 | 100% | ||
remindme.bot | 0 | 116,403,098 | 100% | ||
angelslake | 0 | 8,197,078,173 | 5% | ||
runburgundy | 0 | 1,127,258,824 | 100% | ||
dlike | 0 | 105,866,998,581 | 1.6% | ||
skylinebuds | 0 | 418,379,195 | 1% | ||
triptolemus | 0 | 15,517,503,042 | 4% | ||
wordit | 0 | 7,932,661,531 | 5% | ||
ceruleanblue | 0 | 580,180,327 | 100% | ||
sj-jeong | 0 | 260,153,898,484 | 5% | ||
wondumyungga | 0 | 17,568,517,184 | 5% | ||
remlaps-lite | 0 | 11,482,682,898 | 100% | ||
laissez-faire | 0 | 28,684,210 | 100% | ||
pet.society | 0 | 16,842,048,562 | 2% | ||
steemituplife | 0 | 648,435,729 | 25% | ||
rgirgin | 0 | 488,826,738 | 100% | ||
aquawink | 0 | 20,204,455,855 | 5% | ||
mister-meeseeks | 0 | 10,095,686,285 | 21% | ||
creativeblue | 0 | 2,336,863,112 | 2% | ||
anti-bully | 0 | 1,990,638,655 | 100% | ||
steemelements | 0 | 76,674,290 | 100% | ||
exhaust | 0 | 1,831,573,258,002 | 100% | ||
ringit | 0 | 13,500,533,167 | 5% | ||
coreabeforekorea | 0 | 158,797,729,466 | 5% | ||
svirus | 0 | 5,864,895,383 | 20% | ||
talkative-bk | 0 | 204,401,440,996 | 5% | ||
arequipa | 0 | 541,698,609 | 100% | ||
criptoanarquista | 0 | 1,190,237,818 | 100% | ||
ydav | 0 | 2,280,079,553 | 100% | ||
leviackerman | 0 | 545,531,535 | 100% | ||
bluerobo | 0 | 42,975,106,303 | 100% | ||
primeradue | 0 | 3,854,311,201 | 4% | ||
permaculturedude | 0 | 739,773,014 | 2% | ||
jamesbattler | 0 | 111,299,440,684 | 100% | ||
tipu.curator | 0 | 2,136,241,344 | 50% | ||
grand.strategy | 0 | 4,220,604,632 | 100% | ||
frankdanger | 0 | 540,100,396 | 100% | ||
joanni | 0 | 546,149,288 | 100% | ||
cooperfelix | 0 | 4,845,818,700 | 15% | ||
steemslotgames | 0 | 29,760,077,308 | 20% | ||
sm-skynet | 0 | 3,798,528,077 | 100% | ||
lujuria | 0 | 540,828,421 | 100% | ||
bitcoinator | 0 | 1,586,602,985 | 50% | ||
korle | 0 | 942,724,964 | 100% | ||
knifer | 0 | 579,102,089 | 100% | ||
veralamphea | 0 | 543,888,758 | 100% | ||
augustinaoverb | 0 | 542,458,535 | 100% | ||
antonettalit | 0 | 764,985,321 | 100% | ||
sam-dmc | 0 | 542,312,515 | 100% | ||
smvenezuela | 0 | 543,673,363 | 100% | ||
whatdidshewear | 0 | 40,403,429,053 | 5% | ||
sjgod4018 | 0 | 32,980,574,267 | 5% | ||
mustard-seed | 0 | 15,485,815,422 | 5% | ||
arthurpendragon | 0 | 543,002,441 | 100% | ||
shikataganai | 0 | 542,715,866 | 100% | ||
laverdad | 0 | 542,917,920 | 100% | ||
makotoshishio | 0 | 542,917,920 | 100% | ||
likwid | 0 | 30,715,672,403,128 | 100% | ||
axeminni | 0 | 0 | 4% | ||
justineh | 0 | 554,317,310,876 | 38% | ||
fsm-liquid | 0 | 9,693,233,175 | 4% | ||
triplea.bot | 0 | 1,681,550,171 | 4% | ||
steem.leo | 0 | 116,334,735,981 | 3.8% | ||
leo.voter | 0 | 57,195,454,999 | 0.2% | ||
leo.syndication | 0 | 1,443,755,735 | 4% | ||
giphy | 0 | 6,178,923,905 | 20% | ||
maxuvb | 0 | 1,104,066,631 | 2.8% | ||
maxuvd | 0 | 1,109,665,900 | 2.8% | ||
maxuve | 0 | 7,641,665,338 | 1.96% | ||
untersatz | 0 | 109,276,169,272 | 20% | ||
cryptosearch | 0 | 1,030,332,176 | 100% | ||
joshmania | 0 | 34,081,256,876 | 8% | ||
sqljoker | 0 | 31,423,926 | 2% | ||
therealyme | 0 | 9,098,512,307 | 3.6% | ||
jaykayw | 0 | 10,988,131,685 | 5% | ||
roseofmylife | 0 | 69,994,810,479 | 5% | ||
we-together | 0 | 268,663,209,418 | 5% | ||
tonystarkalive | 0 | 28,767,462 | 2% | ||
reward.tier1 | 0 | 567,585,308 | 100% | ||
bilpcoinpower | 0 | 260,994,790 | 10% |
Great stuff!
author | imwatsi |
---|---|
permlink | q4jw96 |
category | hive-129924 |
json_metadata | {"app":"steemit/0.2"} |
created | 2020-01-23 08:15:09 |
last_update | 2020-01-23 08:15:09 |
depth | 1 |
children | 0 |
last_payout | 2020-01-30 08:15:09 |
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 | 12 |
author_reputation | 131,386,362,730,495 |
root_title | "Exploring new Hivemind Community APIs" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 94,675,966 |
net_rshares | 0 |
Hoping to finally getting around to spinning up my own HiveMind node in the next week or two here. I have a couple questions, in the meantime: * Is there a public HiveMind node available for testing purposes? I remember seeing you post something about your hivemind.emrebeyler.me -- is that still up and public? * Does @holger80's beempy library work with HiveMind nodes? Is that what the [```Discussions```](https://beem.readthedocs.io/en/latest/beem.discussions.html) module is all about?
author | mstafford |
---|---|
permlink | re-emrebeyler-q45wqz |
category | hive-129924 |
json_metadata | {"tags":["hive-129924"],"app":"steempeak/2.2.6"} |
created | 2020-01-15 18:59:24 |
last_update | 2020-01-15 19:00:12 |
depth | 1 |
children | 8 |
last_payout | 2020-01-22 18:59:24 |
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 | 493 |
author_reputation | 63,425,345,982,192 |
root_title | "Exploring new Hivemind Community APIs" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 94,433,252 |
net_rshares | 0 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
maitland | 0 | 0 | 100% |
`hivemind.emrebeyler.me`is up and running but it's running the stable version - communities feature is excluded. No idea about beempy, I don't think it has a Hivemind module.
author | emrebeyler |
---|---|
permlink | q45x8t |
category | hive-129924 |
json_metadata | {"app":"steemit/0.1"} |
created | 2020-01-15 19:09:57 |
last_update | 2020-01-15 19:09:57 |
depth | 2 |
children | 7 |
last_payout | 2020-01-22 19:09:57 |
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 | 175 |
author_reputation | 448,535,049,068,622 |
root_title | "Exploring new Hivemind Community APIs" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 94,433,511 |
net_rshares | 0 |
Ah okay. Thanks for the reply. At the end of the day -- I'm developing a Steem project using Django. I'm not 100% certain, but I'm pretty sure that running an instance of my own Hivemind node would alleviate some of the issues I've been experiencing (generally related to issues with the "tags api" not being accessible, I think -- which was part of what was deprecated from original full nodes, yeah? Things like getting a list of replies to a post, and stuff like that, seems to throw errors for a while now) with just relying on the node-list incorporated into ```beempy```. *** Does it sound like Hivemind would be a worthwhile step, or am I going down the wrong path here?
author | mstafford |
---|---|
permlink | re-emrebeyler-q45xsd |
category | hive-129924 |
json_metadata | {"tags":["hive-129924"],"app":"steempeak/2.2.6"} |
created | 2020-01-15 19:21:51 |
last_update | 2020-01-15 19:22:18 |
depth | 3 |
children | 6 |
last_payout | 2020-01-22 19:21:51 |
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 | 680 |
author_reputation | 63,425,345,982,192 |
root_title | "Exploring new Hivemind Community APIs" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 94,433,773 |
net_rshares | 0 |