this post was submitted on 12 Jul 2023
10 points (91.7% liked)

Lemmy App Development

705 readers
12 users here now

A place for Lemmy builders to chat about building apps, clients, tools and bots for the Lemmy platform.

On-Topic:

Off-Topic:

founded 1 year ago
MODERATORS
 

Since the docs are horrible I think making a megathread here with Q&As and best practices for endpoints would be nice. Would've certainly helped me when I started out.

What do you guys think?

all 9 comments
sorted by: hot top controversial new old
[–] blawsybogsy@lemmy.ml 2 points 1 year ago (2 children)

i'm building a client, happy to help if i can, also to receive help! main issues i have had so far is how to actually use a number of the methods' parameters, like limit (whats the max value?), page (how does pagination actually work?), etc. so far i have been storing any useful info about the API (like the valid values for a given type) in my own lists then querying them in my code.

[–] Cr4yfish@lemmy.world 1 points 1 year ago (1 children)

What's the exact problem with the pagination? Basically you set the page param to the page you want to receive. The amount of pages is unknown to the client, you just know how many per Page you receive (the limit).

However, I'd recommend to make infinite scrollers anyway.

[–] blawsybogsy@lemmy.ml 1 points 1 year ago

i'm just unsure how to actually correctly fetch the next set items in order to update display, whether for scrolling or paginating. for my client i just want to append at the bottom of the screen.

[–] blawsybogsy@lemmy.ml 0 points 1 year ago (1 children)

but i figure the whole community is already about best practices the API / endpoints

[–] Cr4yfish@lemmy.world 1 points 1 year ago

Yeah but I think having a central post to aggregate common questions would be a benefit to everyone, especially new devs.

[–] nachtigall@feddit.de 2 points 1 year ago

Sounds good to me. Maybe also link there some already answered questions.

[–] drew_belloc@programming.dev 2 points 1 year ago

Looks like a good idea, i wanna to build a desktop client but is easier to read the code of other apps then build using the docs

[–] Prefix@lemm.ee 1 points 1 year ago

Hey there!

I'm not opposed to a megathread per-se, but it does feel like we'd be doing more good by focusing that energy on improving the docs and keeping those as the central source of truth. PR's are always open/welcome.

Happy to revisit this if there is a strong demand for a megathread, but in general I don't feel like we have enough content flowing through this community just yet to justify it.