You are viewing a single comment's thread from:

RE: Exploring new Hivemind Community APIs

in Python5 years ago (edited)

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 module is all about?

Sort:  

hivemind.emrebeyler.meis 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.

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?

I think you should be pretty okay with public nodes. What are your requirements and what kind of errors do you get?

Realistically, right now, all I'm trying to do is just get a list of replies to a post. I've build my project, more or less, utilizing beempy. Comments broke a while back, and I haven't really had time to sink my teeth back into it:

from beem.comment import Comment
comment = Comment(@emrebeyler/exploring-new-hivemind-community-apis)
comment.get_replies()

Which then ends up throwing the error below:

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/home/betasites/venv/lib/python3.6/site-packages/beem/comment.py", line 591, in get_replies
    content_replies = self.steem.rpc.get_content_replies({'author': post_author, 'permlink': post_permlink}, api="tags")['discussions']
TypeError: list indices must be integers or slices, not str

Again, I'm not super well versed in the changes that happened to the APIs during the latest HF's. Maybe I'm just completely in the wrong spot trying to find these replies...?


If there's another python library available that would make my life easier -- I'm definitely open to checking it out. I haven't looked into the functionality of lightsteem -- would that one be useful here?

Check out lightsteem, I use it on my scripts/apps all the time. However, it's not advanced as Beem.

That exception you mention needs some debugging. Did you try asking to Beem discord?

Been a while since I've popped in there to touch base with Holger. Maybe worth a visit again.

Still feeling pretty compelled / interested in spinning up a Hivemind node -- so I might start there.

Lightsteem example


c = Client()

replies = c.get_content_replies("emrebeyler", "exploring-new-hivemind-community-apis")

print(replies)

yeah I figured it should be that easy. It used to be, w/ beem.

I'll dig into things and see what's going on.

Cheers!

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63843.45
ETH 2624.02
USDT 1.00
SBD 2.76