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.
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 1 month 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 1 month ago
Do you have a link to the API doc?
wjs018@piefed.social 1 month 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.
db0@lemmy.dbzer0.com 1 month ago
Yeah I would like to support it as well. I’ll wait until the API stabilizes though to avoid more work
Blaze@lemmy.zip 1 month 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?
freamon@preferred.social 1 month ago
I'll just remove the 'freamon' one when the auto-generated one is up to date.
The manually-generated one had 5 missing routes, which I've since added.
The auto-generated one at crust has about 48 missing routes. It's the right approach, and I'll help out with it when I can, but - for now at least - it makes no sense to redirect people to it (either automatically or via a comment).
Some thoughts for @wjs018@piefed.social
/site/instance_chooserprobably doesn't need to be a route. It's just the data format returned by/site/instance_chooser_search. As a route, it's returning the instance info for the site you're querying, so if you want to keep it as a route, it should probably be called/site/instance_infoor something.In the query for
/site/instance_chooser_search,nsfwandnewbieare both booleans. With the rest of the API, these are sent as 'true' or 'false', but they are 'yes' and 'no' for this route.The
newbiequery should probably benewbie_friendlyIn the response,
monthsmonitoredshould probably bemonths_monitoredThere's no way to exclude communities for the response to
/topic/listand/feed/list: If you don't put 'include_communities' in the query, it's defaults to True, but if you put 'include_communities=false' in the query it ends up being True also (because the word 'include_communities' is in the data).SatyrSack@quokk.au 1 month ago
https://freamon.github.io/piefed-api/
Blaze@lemmy.zip 1 month ago
The updated swagger is here crust.piefed.social/api/alpha/swagger see the other comment