this post was submitted on 14 Jun 2023
21 points (100.0% liked)

Programming

3347 readers
1 users here now

All things programming and coding related. Subcommunity of Technology.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS
 

I'm looking for examples of calls to the Lemmy API.. I've been to the following link in the documentation:

https://join-lemmy.org/docs/en/contributors/04-api.html

However I don't see any direct examples of uses of the API for common cases, like creating a post, creating a comment or getting either type of item. Some of the linked documentation from that page points to what I believe is typescript code for interfaces, but that does not really have examples of actually calling those interfaces. I can make some logical guesses at to what the calls should be, but I don't have a way to really verify this yet.

Does anyone have some working examples they can post?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 3 points 1 year ago (1 children)

Very jank response because I’m on my phone!

Looks like you’ll need to POST the header Auth with the token you receive as a LoginResponse https://join-lemmy.org/api/interfaces/LoginResponse.html

(Brb for an edit)

[–] megaman1970 1 points 1 year ago

Cool. Then my other answer is correct. I appreciate the help!