Skip to content

Piero Bosio Social Web Site Personale Logo Fediverso

Social Forum federato con il resto del mondo. Non contano le istanze, contano le persone

Endpoint to get metadata about a url

PieFed API & mobile app dev
1 1 0

Gli ultimi otto messaggi ricevuti dalla Federazione
Post suggeriti
  • 0 Votes
    1 Posts
    0 Views
    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
  • Poll and Event posts in the API

    PieFed API & mobile app dev
    1
    0 Votes
    1 Posts
    0 Views
    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-event In 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: [image: GtQa90oNvDcKyW5.png] and this for poll posts: [image: RQIMWGmG1aQkUu5.png] 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.
  • 0 Votes
    1 Posts
    0 Views
    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.
  • New: user details endpoint

    PieFed API & mobile app dev
    1
    0 Votes
    1 Posts
    0 Views
    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.