I am also ‘Andrew’, the admin of this server. I’ll try to remember to only use this account for posting stuff.

  • 0 Posts
  • 18 Comments
Joined 10 months ago
cake
Cake day: February 17th, 2025

help-circle

  • It’s straight-forward enough to do in back-end code, to just reject a query if parameters are missing, but I don’t think there’s a way to define a schema that then gets used to auto-generate the documentation and validate the requests. If the request isn’t validated, then the back-end never sees it.

    For something like https://freamon.github.io/piefed-api/#/Misc/get_api_alpha_search, the docs show that ‘q’ and ‘type_’ are required, and everything else is optional. The schema definition looks like:

    /api/alpha/search:
        get:
          parameters:
            - in: query
              name: q
              schema:
                type: string
              required: true
            - in: query
              name: type_
              schema:
                type: string
                enum:
                  - Communities
                  - Posts
                  - Users
                  - Url
              required: true
            - in: query
              name: limit
              schema:
                type: integer
              required: false
    

    required is a simple boolean for each individual field - you can say every field is required, or no fields are required, but I haven’t come across a way to say that at least one field is required.


  • PieFed has a similar API endpoint. It used to be scoped, but was changed at the request of app developers. It’s how people browse sites by ‘New Comments’, and - for a GET request - it’s not really possible to document and validate that an endpoint needs to have at least one of something (i.e. that none of ‘post_id’ or ‘user_id’ or ‘community_id’ or ‘user_id’ are individually required, but there needs to be one of them).

    It’s unlikely that these crawlers will discover PieFed’s API, but I guess it’s no surprise that they’ve moved on from basic HTML crawling to probing APIs. In the meantime, I’ve added some basic protection to the back-end for anonymous, unscoped requests to PieFed’s endpoint.


  • What is the update delay for Fediseer?

    I don’t know. It’s not something I’m familiar with - it might just default to saying ‘closed’ if it doesn’t have the data.

    It’s interesting that the obvious bot accounts on those instances were set up in mid-March last year, so I’m guessing that these are somebody’s army that they’ve used before, but overplayed their hand when they turned it on the DonaldJMusk person. The admins can reasonably be blamed for setting up instances with open registrations and no protections and then forgetting about them, but I’d be wary of blaming them for being behind the attack directly. The ‘nicole’ person is unlikely to have used their own instance - it’s probably just someone with the same MO as whoever owns the bots, finding and exploiting vulnerable instances.








  • PieFed is just a Fediverse platform that aims to inter-op with Lemmy in much the same way that it aims to inter-op with any other Group-based platform (MBIN, PeerTube, NodeBB, Wordpress).

    Lemmy’s “quirks” are the reason why your account won’t see Polls from MBIN, or channels from PeerTube, or posts from NodeBB, or backfilled content from Wordpress.

    It’s not my intent to criticise Lemmy, but these are verifiable problems, whereas it doesn’t seem fair to criticise PieFed for problems that you can’t clearly remember.




  • Do all filters have that 3 level system?

    Yes - that Trump/Musk form is just a shortcut to setting up your own filter - the options on that form equate to ‘hide completely’, ‘make semi-transparent’ (so you can see the post, but it’s faded out), or “don’t set up a filter”

    Also, do you know of an alternative front-end for Piefed?

    There’s the one I made (the one linked to by OpenStars), but I think the more promising development is that the Interstellar dev has made some progress supporting PieFed too (Interstellar is already the only app that supports both MBIN and Lemmy, and I like the idea of one app for 3 different platforms).


  • As a term, ‘instance’ is already baked into code, databases, and APIs.

    If I wanted to use an API to block ‘lemmy.world’, for example, I’d call ‘site/block’ with the relevant ‘instance_id’. That’s already 2 different terms for the same thing (‘site’ and ‘instance’), which isn’t great, but adding ‘provider’ into the mix means you’re now saying “if you want to block a ‘provider’, use the ‘site’ endpoint with the ID for the ‘instance’”, which is arguably worse.




  • No. The app was forked from a Lemmy app (Thunder), so there’s not much PieFed-specific in it (e.g. there’s also no support for Polls). The exception is that it supports post / comment subscribing (I was notified of your comment, even though I’m not the OP of this post).

    I created a new instance for testing the app, and I didn’t create any Topics (partly laziness, partly because the whole area is being re-evaluated for user-created Topics, aka Feeds).

    The app will lag behind the site in features, 'cos adding stuff for direct HTML rendering will always be easier than adding stuff that’s got to come through an API.