No clue, sorry.
Is there a Python wrapper for writing PieFed bots? Or does Pythörhead work of-the-box for PieFed?
Coelacanth@feddit.nu 5 days ago
Is there a Python wrapper for writing PieFed bots? Or does Pythörhead work of-the-box for PieFed?
No clue, sorry.
db0@lemmy.dbzer0.com 5 days ago
I don’t think piefed has the same API has lemmy, so no. It’s been something I wanted to onboard (the piefed API) ,but I haven’t fouind the time.
SatyrSack@quokk.au 5 days ago
I do see there is code to throw an error when it detects an instance is not Lemmy, so it definitely doesn't work out-of-the-box. But the APIs for each are supposedly similar to each other, so it fortunately should not take any major rewrite to support both in the same wrapper.
db0@lemmy.dbzer0.com 5 days ago
Do you have a link to the API doc?
wjs018@piefed.social 5 days ago
Like Blaze mentioned, the api is a bit of a work in progress and we are revamping the swagger. The version of the api spec you have there (freamon's) is manually created and can have some inaccuracies because of that. We are in the process of making the piefed api self-documenting so that inputs/outputs are validated against the schema, but there are a lot of endpoints still to go in that effort.
Some of those revamped endpoints are going to be coming in the 1.2 release. For the self-documented endpoints that have been done so far, you can check the swagger on crust (the dev instance running right off the main branch).
To keep up with this effort as I am working through it, I have been making posts to !piefed_api@piefed.social.
On a personal note, I would kill for a pythorhead-but-for-piefed to exist. I pretty extensively use pythorhead in my lemmy communities now, so I am hopeful that we can get the api in a stable enough state to enable tools like this to exist in the near future.
Blaze@lemmy.zip 5 days ago
The updated swagger is here crust.piefed.social/api/alpha/swagger
@wjs018@piefed.social , @andrew_s@piefed.social should the freamon page redirect to the crust one?
SatyrSack@quokk.au 5 days ago
https://freamon.github.io/piefed-api/