I did: curl https://lemmy.blahaj.zone/api/v3/community/list
I got 4 communities and "egg_irl" wasn't there...? why it is on !egg_irl? I'm confused and the lemmy api docs aren't beginner friendly... ahhhh And I know the most of you know how to code.
I did: curl https://lemmy.blahaj.zone/api/v3/community/list
I got 4 communities and "egg_irl" wasn't there...? why it is on !egg_irl? I'm confused and the lemmy api docs aren't beginner friendly... ahhhh And I know the most of you know how to code.
10 Comments
bootyberrypancakes@lemmy.blahaj.zone · 12 pts · 3y
I just looked at the Rust code from https://github.com/LemmyNet/lemmy/blob/main/crates/api_common/src/community.rs
and it looks like you need to give it params to get what you need, i.e.
curl https://lemmy.blahaj.zone/api/v3/community/list?type_=Local\&sort=Active\&limit=50 | jqReturns the top 50 local communities sorted by Active
solivine@lemmy.world · 10 pts · 3y
I had something like this recently, I tried to find the community "!vintagestory@lemmy.ca" (found from lemmyverse.net) but searching that in the search bar gave nothing. I also searched vintage, and the first time I searched it that also yielded nothing, but the second time it did. There does seem to be a little inconsistency but I'm sure they're working on it! :)
frieda@lemmy.blahaj.zone · 4 pts · 3y
Lemmy posted my bot created post in the wrong instance, I think Lemmy has problems with instances.
bootyberrypancakes@lemmy.blahaj.zone · 3 pts · 3y
The search thing is normal if no other user on our instance has searched/subscribed to that community. Annoying but if you know you got the link right, hit reload and the server will usually have loaded it lol
ActuallyASeal@lemmy.world · 5 pts · 3y
Finding the docs for the API end points is a pain in the ass. Best I found is this but it seems to be version 1 of the API.
Looking at the communities/list end point I the request can have the following arguments.
{ op: "ListCommunities", data: { sort: String, page: Option<i64>, limit: Option<i64>, auth: Option<String> } }Looks like there are multiple pages you probably only got page 1.Try:
curl https://lemmy.blahaj.zone/api/v3/community/list?page=2kitten@lemmy.ca · 2 pts · 3y
On the Lemmy website when I click documentation for the api it just takes me to the JavaScript client directly!
ActuallyASeal@lemmy.world · 1 pts · 3y
You should be able to figure out the http calls from here.
kitten@lemmy.ca · 2 pts · 3y
thank you 💜