this post was submitted on 11 Jun 2023
25 points (100.0% liked)

Lemmy

12779 readers
43 users here now

Everything about Lemmy; bugs, gripes, praises, and advocacy.

For discussion about the lemmy.ml instance, go to [email protected].

founded 5 years ago
MODERATORS
 

I want to start doing programmy things, is there any documentation on API endpoints I can use for reference? Or do I just have to reverse-engineer the code from github?

top 5 comments
sorted by: hot top controversial new old
[–] Die4Ever 10 points 2 years ago
[–] targetx 3 points 2 years ago (1 children)
[–] [email protected] 2 points 2 years ago* (last edited 2 years ago) (1 children)

The TLDR is that they used to, but they became unmaintained. They recommend autogenerating your openapi/library from the rust code directly, like their typescript library does.

Edge cases are undocumented at the moment, and the devs are focusing on keeping the site up atm instead of making more detailed docs.

There are over 250 endpoints, so don't try to implement them all by hand, just use a code generator, Rust is very strongly typed and your code generator will get it right the first time.

[–] Die4Ever 2 points 2 years ago (1 children)

They recommend autogenerating your openapi/library from the rust code directly, like their typescript library does.

could this be done in their Github Actions so it's easily accessible? I think it's possible to have Github Actions update a Github Wiki

[–] [email protected] 3 points 2 years ago

That would be smart. I'm sure there is some sort of toolchain that can go from rust -> openAPI -> markdown -> docs page.

Could be worth looking into over the next few weeks, but personally, I'm very busy with building Lemmy instances at the moment.

load more comments
view more: next ›