PieFed API & mobile app dev

72 readers
1 users here now

Announcements and discussions about the PieFed API - changes, improvements and general co-ordination between the frontend developers and the core of PieFed.

founded 3 weeks ago
MODERATORS
1
 
 

POST /community/moderate/ban was using expiredAt while the rest of the API is in snake_case. Also some of the response was not in snake case either, so I tided that up.

PUT /community/moderate/unban is also affected. (why is it a PUT??)

GET /community/moderate/bans now uses snake case.

We're cooking up an automatically-updated swagger / openapi solution right now, please bear with us.

2
 
 

GET /api/alpha/user was already returning default_sort_type but it now also returns default_comment_sort_type (for sorting comments, not posts). It was also returning show_nsfw and it now also returns show_nsfl.

You can also PUT those values to /api/alpha/user/save_user_settings to... guess what, save their settings.

Although PieFed has these default sorts it's up to the API user to use them when GETing /post/list and /comment/list as those endpoints will default to 'Hot' if there is no sort parameter.

3
4
 
 

At the bottom of https://codeberg.org/rimu/pyfedi/src/branch/main/app/api/alpha/routes.py#L869 you can see a bunch of endpoints that are not implemented. There are others we could do with too, like endpoints for feeds and topics...

Please highlight the highest priority things that you feel are missing at the moment, in the comments.

5
 
 

This issue is in the work queue for v1.1 and is one of the only substantial pieces of work remaining before we release that version. So I'm keen that I or someone to get started on this very soon.

It could be quite disruptive to apps that already use this endpoint so I thought I'd ask people how they want this to go. I'm thinking just make a whole new endpoint, maybe /api/v1/comment/list...

6
 
 
  • filtered is true if one of the user's keyword filters should hide this post from them.
  • blurred is true if the post is nsfw, nsfl, from a bot or contains a spoiler and they indicated they don't want nsfw, bot posts, etc.
7