- Home
- Categories
- PieFed API & mobile app dev
- New: domain blocking endpoint
New: domain blocking endpoint
-
POST /api/alpha/domain/blockA domain block will stop all posts that links to that domain from being returned by /api/alpha/post/list for that user.
See https://piefed.social/api/alpha/swagger for details.
Feed RSS
Gli ultimi otto messaggi ricevuti dalla Federazione
-
PieFed v1.4 (to be released very soon) will have emoji reactions on posts and comments. An emoji reaction can be a unicode character like 😍 or a colon-delineated string like :piefed: which gets automatically converted into an image when the post/comment is displayed.
Setting a reaction uses the same API endpoint as casting a vote (and behind the scenes reactions are federated as Likes, for Lemmy compatibility) but with an emoji element added to the JSON payload.

Also when looking at a post or comment in the API there is an emoji_reactions element that can be used to get a summary of the reactions that have happened so far. Compare https://crust.piefed.social/api/alpha/comment?id=456791 with https://crust.piefed.social/post/84566#comment_456791 to see what I mean.
Do a GET on /api/v3/site to retrieve a list of all the custom emoji (the ones with :something:) that this instance knows about and to find what images to convert usages of them in emoji_reactions to.
-
/api/alpha/post/site_metadata
It functions identically to Lemmy's endpoint of the same name although embed_video_url is never populated.
Over the last few days there's been a raft of other API changes too, to do with
The new Gen AI filter (user settings to determine), an AI label on posts, etc. Marking comments as an answer. Each comment has an answer boolean on it and there's an endpoint to toggle it. Also you can change whether a community is a Q n A community or not in the community edit endpoint.
-
GET /api/alpha/search now uses the same full-text search engine as the web UI so you can sort results by relevance. e.g.
https://piefed.crust.social/api/alpha/search?q=test&type_=Posts&sort=Relevance
Also if the q parameter has a value then read posts are included in the results regardless of what the user's setting is for hiding read posts. That is to avoid this problem: https://piefed.social/c/lemmyconnect/p/1502152/is-there-any-way-to-include-read-posts-in-search-results
-
This is ready for testing on crust.piefed.social. I've made two testing posts in the testing community
https://crust.piefed.social/c/test/p/74625/test-poll https://crust.piefed.social/c/test/p/74626/test-eventIn the API they show up as extra data on a post. For example here https://crust.piefed.social/api/alpha/post/list?community_name=test@crust.piefed.social you'll see this for event posts:

and this for poll posts:

Other types of post will not have that data present, not even as an empty object or null. Let me know if that causes you problems.
As always, the full API spec is at https://crust.piefed.social/api/alpha/swagger including how to add or edit those types of post. It's the same data structure as getting a post.
-
POST /api/alpha/upload/image - upload an image, get a url back. Use that to construct markdown/html as you wish. Uploaded images are associated with the current user and count towards their quota (50 MB by default, tweakable by instance admin)
GET /api/alpha/user/media - get all the images the current user has uploaded. Use this to provide a image picker.
POST /api/alpha/image/delete - provide the url of an image that the current user owns and it'll be deleted.
Details in the swagger docs.
-
GET /api/alpha/user/me - retrieves all the information about the current user, including all the things they've blocked, communities they have joined and communities they moderate.
I built this because I realised that many apps are making requests to /api/alpha/site for this purpose, which is unfortunate as that endpoint returns a lot more besides and can sometimes be slow to do so. This is intended to be a more lightweight alternative to doing a GET of /api/alpha/site so the information in /user/me is the same as the my_user part of /site.
-
POST /api/alpha/domain/block
A domain block will stop all posts that links to that domain from being returned by /api/alpha/post/list for that user.
See https://piefed.social/api/alpha/swagger for details.
Post suggeriti
-
Emoji reactions in the PieFed API
Watching Ignoring Scheduled Pinned Locked Moved PieFed API & mobile app dev emoji
1
0 Votes1 Posts1 Views -
Endpoint to get metadata about a url
Watching Ignoring Scheduled Pinned Locked Moved PieFed API & mobile app dev0 Votes1 Posts3 Views -
Poll and Event posts in the API
Watching Ignoring Scheduled Pinned Locked Moved PieFed API & mobile app dev0 Votes1 Posts2 Views -
Image management endpoints for images inside post and comment bodies
Watching Ignoring Scheduled Pinned Locked Moved PieFed API & mobile app dev0 Votes1 Posts1 Views