Notes on Friendica API


API requests


get whole conversation


I propose the following API method to fetch a statusnet conversation:

/api/statuses/conversation/:id
...returns a JSON-Array of all statuses where statusnet_conversation_id = :id


For testing, I extended /api/statuses/show/:id to understand the param ?conversation=true. (See this Pull request on Github)


NOTE:

The current version of Friendica app uses this extended method. It is already integrated in the official codebase, but your server admin needs to update Friendica. Until that happened, you will probably get the error message "Sorry, your Friendica server doesn't support conversation view!" when opening the "Post Details" view by clicking on a post in timeline.



set/unset 'like'/'dislike' flag on posts


photos and albums:

...load list of all albums of logged-in user

...load list of all photos/photos in a specific album

...get/change photo details:
- Album Name
- Subtitle
- Tags
- Rotate
- Permissions



API's used by Friendica For Android


PostDetailFragment calls:

/api/statuses/show/:ID

When clicking on a post, the Post Detail Fragment is shown. It calls this method twice: first with the clicked posts id to find out the parent id (if any). After that, this method is called with the parent id (conversation_id) and the param ?conversation=true set. This fetches the whole thread (includes the original post and all comments)




WritePostFragment calls:

/api/statuses/update





FriendListFragment calls:

/api/statuses/friends






PostListFragment calls:

/api/statuses/home_timeline




/api/statuses/user_timeline






UserProfileActivity calls:

/api/users/show/:id


...and embeds a PostListFragment which calls user_timeline with user ID.



PostListFragment / Notification:
HomeActivity / MainMenuFragment:

/ping (xml)