blawsybogsy

joined 4 years ago
1
submitted 8 months ago* (last edited 8 months ago) by blawsybogsy@lemmy.ml to c/lemmydev@lemm.ee
 

There's now a swagger documentation for the Lemmy API.

See also https://mv-gh.github.io/lemmy_openapi_spec/

 

I just implemented a user overview of mixed posts and comments, but I'm unsure how to do so while respecting sort (hot, new, old, etc.). Currently I merge the user's comments and posts into a list, then sort them all by timestamp.

Because sorting is handled on the server, and merging posts/comments happens after, I can't see how I can't respect sort and still merge the two sets. Does anyone have any pointers?

I expect a similar issue would arise for the unified inbox view also (replies, mentions, and private messages), although in that case there's less need to sort by anything other than recency.

EDIT: here's the relevant ts code in the official lemmy ui. it sorts by date if sort is new, which i already do, then otherwise it just sorts by "score".

https://github.com/LemmyNet/lemmy-ui/blob/79ed5903354067636f5eb9686ff0a005117bc541/src/shared/components/person/person-details.tsx#L245

 

Mito docs are pretty scarce, here's a helpful tutorial for getting a nice cruddy CRUD going.

 

"We create a search form, display products with ready-to-use HTML templates, organize our Djula templates with inheritance. Common pitfalls. That's the basics every web developer should know!"

https://www.youtube.com/watch?v=EFRVHmOCE7Q

By Vindarel, of CL cookbook fame.

1
submitted 10 months ago* (last edited 10 months ago) by blawsybogsy@lemmy.ml to c/emacs@lemmy.ml
 

updated lem.el lemmy client for emacs.

  • added an action/response/update display system for direct feedback upon executing an action (feature, save, delete, like, create, edit item).
  • added a completing-read system
  • added un/block instances, communities, and users functions.
  • various other fixes.
 

currently my client displays child comments/replies to a given comment based on a get-comments request and the sort arg. if a child comment is returned by such a request, it will be included as part of the tree, but otherwise not. it means the child is subject to sorting itself.

but what is needed is that if a parent comment is displayed/returned by request/sort arg, all its children should be also. that seems to me to be how the webUI works also.

any tips on how to ensure that?

 

did a maniac hack on the old lem.el recently, mainly for the 0.19 release. overhauled the logic of all the sorting/listing commands. they should be more rigorous and flexible to update now. various other fixes too. pushed to main, so will hit MELPA soon.

also added unified inbox for replies, mentions, and private messages, and various other minor display improvements.

 

Is there anywhere that lemmy's various types of internal links are documented? like !community links @user links, links of the form https://lemmy.com/c/community@otherinstance.net. i have also seen links that just have "/c/community@otherinstance.net"... at the moment i'm only developing rendering code for them as i happen upon them, which is ad-hoc

 

Or is it documented? with mastodon, i set up clients to always load URLs in my app if they resembled masto-compatible URLS. I'm unsure how to go about this with lemmy. the lemmy-js-client "documentation" makes no mention of webfinger at all, though the lemmy repos have PRs fixing it.

 

The Limit property is just a number, but it is different for different API endpoints. I'd like to have a list of the different values so i can easily stay within the max for each endpoint. Are the values documented somewhere? From the official js-client docs site, not even a given endpoint documents its maximum.

 

i have requests to fetch comment and post data, but i'm struggling to work out how to build a tree from the responses? do i fetch comments with arg parent_id to get a comment's children, and do so recursively for those comments returned that themselves have comments?

view more: next ›