26
2
submitted 1 year ago by rikudou@lemmings.world to c/lemmydev@lemm.ee

It now supports 0.18.3 and contrary to previous releases it supports unauthenticated requests where it makes sense.

https://github.com/RikudouSage/LemmyApi/

27
4
submitted 1 year ago* (last edited 1 year ago) by RoundSparrow@lemmy.ml to c/lemmydev@lemm.ee

Someone was asking about it in support, so I was curious to try it. The Rust code has HideCommunity, I even tried to bypass the JavaScript client and do a direct API call.

Does anyone see the function call to send a HideCommunity object?

Where it might be disabled in the Rust code? I know it goes all the way into the database and is on SELECT statements.

Thank you

28
7
submitted 1 year ago by RoundSparrow@lemmy.ml to c/lemmydev@lemm.ee

For lemmy server testing and performance baseline measurement, I think it would be cool to have every API call exercised.

Anyone willing to create and share some JavaScript client code? Normally these are run with Jest via NodeJS - but we can make it an extra step to integrate into Jest. I'm just thinking someone doing front-end app work can do a well organized hit on every API surface.

You can skip the creation of a user if you want, that code is already in the testing

Probably ideal to organize moderator vs non-moderator.

Something like: edit profile with every option one at a time, create a community, edit it, create posts, edit, delete, undelete, reply, etc. Imagine you were doing interactive tests of a major upgrade and wanted to hit every feature and button.

Right now most of that testing is done in independent scripts, such as a user test: https://github.com/LemmyNet/lemmy/blob/main/api_tests/src/user.spec.ts

And you can see it only tests editing a profile is working, not that actual features change their behavior. Although I've started to add that for back-end behaviors like showing read/unread posts on the list. Front-end devs are the ones who know what end-users do and the fringe cases to look out for. Thank you.

29
12
submitted 1 year ago by CMahaff@lemmy.world to c/lemmydev@lemm.ee

You will want to change your Cargo.toml to point to the Lemmy Github repository + either a specific tag or branch for the version you want to target.

See the examples here: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories

30
4
submitted 1 year ago* (last edited 1 year ago) by silas@programming.dev to c/lemmydev@lemm.ee

I'm getting a "user_already_exists" error from /user/save_user_settings no matter what settings I try to change. The JWT is valid, and this is happening on multiple instances the same (programming.dev, lemm.ee, etc.) Anyone have any ideas why I'd be getting this? Here's my payload:

{
  show_bot_accounts: true,
  auth: token
}

Edit: This issue describes a bug where this happens when the avatar field is not included. Just tested it and that's the same problem I'm running into. I fixed it temporarily by passing the current avatar url.

31
2
submitted 1 year ago* (last edited 1 year ago) by RoundSparrow@lemmy.ml to c/lemmydev@lemm.ee

Is .moderators supposed to be on GetCommunity() result? I can't seem to find it in lemmy_server api_tests context. All I'm getting is languages and community_view

EDIT: Wait, so there is a "CommunityResponse" and a "GetCommunityResponse", object? What call do I use to Get a GetCommunityResponse object?

https://github.com/LemmyNet/lemmy-js-client/blob/2aa12c04a312ae4ae235f6d97c86a61f58c67494/src/types/GetCommunityResponse.ts#L7

32
2
submitted 1 year ago by manucode@infosec.pub to c/lemmydev@lemm.ee

I'm not 100% sure if this is the right community for my question. Should that be the case, I want to apologize.

Alternative to mega-threads: Could this feature be implemented by a Lemmy instance?

Basically, my idea is to allow community mods to quarantine posts into groups called super-threads. These super-threads would show up in the community appearing like regular post. But when you open such a super-thread, you would see an overview over all the posts quarantined to this super-thread. It would look similar to a community. Quarantined posts could still be found by a search but they wouldn't show up in the community overview or the general feed. Only the super-threads themselves would show up there. That way, mods could stop a single topic from overwhelming a community by quarantining all related posts to one super-thread. Thereby, super-threads could replace existing mega-threads while maintaining the forum-like form of Lemmy.

33
5
submitted 1 year ago by blawsybogsy@lemmy.ml to c/lemmydev@lemm.ee

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

34
57
submitted 1 year ago by evgiz@lemm.ee to c/lemmydev@lemm.ee

cross-posted from: https://lemm.ee/post/1358038

Hi everyone! I'm happy to announce that my iOS Lemmy app "Avelon" is finally ready for beta testing! I've been working tirelessly on the app lately and I think it is turning into a quite solid experience now. I'm very excited to hear what you think and gather more feedback before I move towards an App Store release.

My focus for Avelon has been to polish the base functionality as much as possible to ensure that the day-to-day browsing feels as good as possible. I've also done things a bit differently to make it easier for new people to try out the Fediverse. Rather than requiring new users to look through a complicated list of instances the first time, the app automatically shuffles a list of preset instances so you don't need to think about it until later when you register. This will hopefully also reduce the load on individual servers.

Features

Avelon already supports quite a few cool features:

  • Posts and feeds
    • Clean UI to explore all your feeds
    • A pretty nice comment view
    • Support for images, GIFs, videos, youtube
    • See community feeds and sidebars
    • Quick search communities and subscriptions
  • Login to your account
    • Reply to posts/comments (with markdown highlighter!)
    • View and edit your old comments
    • Upvote comments and posts
    • View/manage your followed communities
  • Design & customization
    • Dark and light mode with customizable accent color
    • Compact posts, large posts and gallery view
    • Footer/header bars automatically hide for a cleaner experience
    • Change behavior such as tap to collapse, default sorting etc.
    • Long press actions for a less cluttered interface

..and probably some other things I can't remember just now.

Screenshots

Check these out!

Screenshot 1

Screenshot 2

Screenshot 3

Screenshot 4

Join the beta

The beta is available on testflight through this link (limited to 1000 testers for now):

Join Avelon Beta on Testflight

The app is supported on all iPhones with iOS 16 and higher (worked ok on my old iPhone X!). I'd love to hear what you think about the overall user experience, design, functionality, stability as well as any bugs or issues you might find. A few important features are still missing, most notably adding new posts. I'd love to hear what additions you are most interested in me looking at first:

  • Creating posts
  • Viewing users comments/posts
  • Saving posts/comments
  • Report/mod tools
  • Multiple accounts
  • Themes/more customization
  • Improved image/video viewer
  • Anything else?

Thank you & future plans

First, I'd like to thank Christian Selig (the developer of the Apollo app) for creating a really amazing app that I've been using every day for the last several years. As you can tell, Avelon is definitely inspired by Apollo (though I think I've put my own personal spin on the design and functionality!).

If people enjoy Avelon I'd like to spend more of my free time working on it and improving the app over time. In the spirit of transparency, I'd like to mention that I might do some kind of "pro" version at some point later on to support the project. All the base functionality people need will of course be free, but pro features could be additional "nice-to-have" features like themes or advanced tools etc. I'm not planning to do anything paid just yet though, just wanted to mention it. Right now my focus is to provide a great experience and to help build the Lemmy platform into something even better.

Finally I'd like to thank the Lemmy developers as well as everyone using the platform. Everyone contributing is making this platform the amazing place it is turning into. I personally haven't browsed the site-that-should-not-be-named since the API shut down - I decided to spend all that time on developing this app instead. And I'm really excited to see what Lemmy becomes over the years.

Sigve Røkenes

/evgiz

35
12
submitted 1 year ago by silas@programming.dev to c/lemmydev@lemm.ee
36
10
submitted 1 year ago by aika@lemmy.zip to c/lemmydev@lemm.ee

Hey, I'm thinking about creating a web-based (PWA) app for subscribing to Lemmy RSS feeds, mainly for notifications.

I've noticed that I strongly prefer to be notified of changes in my inbox or in my subscribed communities and I'm using a simple RSS reader now, but it doesn't really cut it for Lemmy.

Would anyone be interested in using such app? I'll greatly appreciate feedback :)

37
15
submitted 1 year ago* (last edited 1 year ago) by silas@programming.dev to c/lemmydev@lemm.ee

I hope this is obvious, but I wanted to get it out there because of how important it is.

If your client allows user-entered Lemmy instances, ALWAYS verify that the instance is a valid Lemmy instance before sending credentials over. Otherwise, the user may have entered a url to an unknown server or site, and you will be sending their login credentials to a server that may be logging and storing the request or even intentionally trying to capture these credentials.

Instead, call getSite at the very least, or use a public list of verified servers before making the login request.

I would not be surprised if down the road malicious sites with similar domains to popular instances will be created to get login details of users who mis-typed their instance domain. It’s partially our responsibility to make sure our users are safe, so let’s keep this discussion going as we learn new ways to handle security concerns!

38
9
Regex for lemmy spoilers (programming.dev)
submitted 1 year ago* (last edited 1 year ago) by starman@programming.dev to c/lemmydev@lemm.ee

Through trial and errors, I've created regex for lemmy spoilers:

/:::\sspoiler\s+(?<title>.+)\n(?<body>[\s\S]+?)\n:::/g

link to regex101.com with explanation

39
7
submitted 1 year ago by CaspianXI@lemmy.world to c/lemmydev@lemm.ee

I've read through the docs, but it doesn't tell me how to get a token. This should be obvious, I know... Sorry...

40
7
submitted 1 year ago* (last edited 1 year ago) by Cr4yfish@lemmy.world to c/lemmydev@lemm.ee

Does anyone know how to get the trending communities? Or do you have to calculate that yourself?

I've studied the API docs like my life depends on it but I can't find it anywhere.

41
13
submitted 1 year ago by fievel@lemm.ee to c/lemmydev@lemm.ee

I made a script based on plemmy and LemmyHttp API to be able to backup the list of registered communities and user profile (for now, that's just the biography). It output in human-readable format on console and have an option to output in a json file. The next step will be to provide also a script to restore such json backup to another lemmy instance or user.

I decided to do this small development following the sudden disappearance of vlemmy.net instance which resulted in the lost of all my subscribed communities.

42
10
submitted 1 year ago* (last edited 1 year ago) by Cr4yfish@lemmy.world to c/lemmydev@lemm.ee

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?

43
7
submitted 1 year ago by fievel@lemm.ee to c/lemmydev@lemm.ee

cross-posted from: https://lemm.ee/post/973445

Hello, do you know about a script or app or so that can backup data from a Lemmy instance as an end-user? At least the list of subscribed communities, settings, profile (bio) should be nice. I've been on VLemmy and lost one full evening trying to figure out what my subscription were (well not completely lost my time I also discovered new communities), but I want to avoid that in the future. If this doesn't exist yet I may develop it but I'm pretty sure I'm not alone and someone did it already...

44
2
submitted 1 year ago by blawsybogsy@lemmy.ml to c/lemmydev@lemm.ee

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.

45
21
submitted 1 year ago by idunnololz@lemmy.world to c/lemmydev@lemm.ee

Hello! I’m the developer of Summit, one of the Lemmy apps.

I want to be able to mark a post as read using an API call.

I understand that fetching the post itself using the account JWT will mark the post as read for that account, however this also fetches a lot of data.

Trying to be as server friendly as possible, what is the least resource intensive way to mark a post as read and nothing else?

46
6
submitted 1 year ago* (last edited 1 year ago) by canpolat@programming.dev to c/lemmydev@lemm.ee

I'm working on a test bot to understand the API and I have a question about authentication and JWT validation.

As far as I can see, the way to authenticate is to call the /user/login endpoint with valid credentials which will return a JWT. All is good except the JWT payload. I see that it contains iat but nothing about expiry (exp).

Now, I wanted to use the JWT for multiple requests, but that's difficult if I cannot figure out when the token expires. What is the best way to be sure about the validity of a JWT before using it. Should I get a new JWT before every operation, is that the intended behavior? Or maybe I misunderstand the way authentication works with Lemmy?

Edit: I asked this on Lemmy Development channel a few days ago and apparently someone has created an issue in Github. So, perhaps this will be addressed in a later update.

47
3
submitted 1 year ago by Louise@lemm.ee to c/lemmydev@lemm.ee

Is there any Discord bot that can automatically post Lemmy threads to a channel? I would use webhooks to do so for Reddit for easy use with the server our subreddit had, but since moving to Lemmy and the API death, that doesn't work and now we need an equivalent for Lemmy. So, anybody know if any exist yet?

48
10
submitted 1 year ago* (last edited 1 year ago) by silas@programming.dev to c/lemmydev@lemm.ee
49
10

Hi all,

I've put together some code on on Val Town that easily allows auto-publishing videos on Youtube channels to a Lemmy community.

It's simple enough that hopefully anyone should be able to set it up, and Val Town has a free tier which should be enough for anyone to publish a few feeds for free. There's a "README" on top showing how it's used.

Anyway, let me know what you think! If you end up using it, I'd love to get some thoughts on how easy it was to set up etc.

50
2
submitted 1 year ago by blawsybogsy@lemmy.ml to c/lemmydev@lemm.ee

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.

view more: ‹ prev next ›

Lemmy App Development

693 readers
18 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