1 Implemented API calls
\r
3 The friendica API aims to be compatible to the [StatusNet API](http://status.net/wiki/Twitter-compatible_API) which aims to be compatible to the [Twitter API 1.0](https://dev.twitter.com/docs/api/1).
\r
5 Please refer to the linked documentation for further information.
\r
10 ### Unsupported parameters
\r
11 * cursor: Not implemented in StatusNet
\r
12 * trim_user: Not implemented in StatusNet
\r
13 * contributor_details: Not implemented in StatusNet
\r
14 * place_id: Not implemented in StatusNet
\r
15 * display_coordinates: Not implemented in StatusNet
\r
16 * include_rts: To-Do
\r
17 * include_my_retweet: Retweets in friendica are implemented in a different way
\r
19 ### Different behaviour
\r
20 * screen_name: The nick name in friendica is only unique in each network but not for all networks. The users are searched in the following priority: Friendica, StatusNet/GNU Social, Diaspora, pump.io, Twitter. If no contact was found by this way, then the first contact is taken.
\r
21 * include_entities: Default is "false". If set to "true" then the plain text is formatted so that links are having descriptions.
\r
24 * cid: Contact id of the user (important for "contact_allow" and "contact_deny")
\r
25 * network: network of the user
\r
27 account/verify_credentials
\r
31 * skip_status: Don't show the "status" field. (Default: false)
\r
32 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
34 statuses/update, statuses/update_with_media
\r
38 * title: Title of the status
\r
39 * status: Status in text format
\r
40 * htmlstatus: Status in HTML format
\r
41 * in_reply_to_status_id
\r
45 * source: Application name
\r
51 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
53 ### Unsupported parameters
\r
56 * display_coordinates
\r
62 * q: name of the user
\r
64 ### Unsupported parameters
\r
73 * user_id: id of the user
\r
74 * screen_name: screen name (for technical reasons, this value is not unique!)
\r
75 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
77 statuses/home_timeline
\r
81 * count: Items per page (default: 20)
\r
83 * since_id: minimal id
\r
84 * max_id: maximum id
\r
85 * exclude_replies: don't show replies (default: false)
\r
86 * conversation_id: Shows all statuses of a given conversation.
\r
87 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
89 ### Unsupported parameters
\r
92 * contributor_details
\r
94 statuses/friends_timeline
\r
98 * count: Items per page (default: 20)
\r
100 * since_id: minimal id
\r
101 * max_id: maximum id
\r
102 * exclude_replies: don't show replies (default: false)
\r
103 * conversation_id: Shows all statuses of a given conversation.
\r
104 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
106 ### Unsupported parameters
\r
109 * contributor_details
\r
111 statuses/public_timeline
\r
115 * count: Items per page (default: 20)
\r
116 * page: page number
\r
117 * since_id: minimal id
\r
118 * max_id: maximum id
\r
119 * exclude_replies: don't show replies (default: false)
\r
120 * conversation_id: Shows all statuses of a given conversation.
\r
121 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
123 ### Unsupported parameters
\r
130 * id: message number
\r
131 * conversation: if set to "1" show all messages of the conversation with the given id
\r
132 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
134 ### Unsupported parameters
\r
135 * include_my_retweet
\r
142 * id: message number
\r
143 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
145 ### Unsupported parameters
\r
152 * id: message number
\r
153 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
155 ### Unsupported parameters
\r
162 * count: Items per page (default: 20)
\r
163 * page: page number
\r
164 * since_id: minimal id
\r
165 * max_id: maximum id
\r
166 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
168 ### Unsupported parameters
\r
171 * contributor_details
\r
177 * count: Items per page (default: 20)
\r
178 * page: page number
\r
179 * since_id: minimal id
\r
180 * max_id: maximum id
\r
181 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
183 ### Unsupported parameters
\r
186 * contributor_details
\r
188 statuses/user_timeline
\r
192 * user_id: id of the user
\r
193 * screen_name: screen name (for technical reasons, this value is not unique!)
\r
194 * count: Items per page (default: 20)
\r
195 * page: page number
\r
196 * since_id: minimal id
\r
197 * max_id: maximum id
\r
198 * exclude_replies: don't show replies (default: false)
\r
199 * conversation_id: Shows all statuses of a given conversation.
\r
200 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
202 ### Unsupported parameters
\r
205 * contributor_details
\r
210 Unofficial Twitter command. It shows all direct answers (excluding the original post) to a given id.
\r
213 * id: id of the post
\r
214 * count: Items per page (default: 20)
\r
215 * page: page number
\r
216 * since_id: minimal id
\r
217 * max_id: maximum id
\r
218 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
220 ### Unsupported parameters
\r
223 * contributor_details
\r
229 * count: Items per page (default: 20)
\r
230 * page: page number
\r
231 * since_id: minimal id
\r
232 * max_id: maximum id
\r
233 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
235 ### Unsupported parameters
\r
239 Favorites aren't displayed to other users, so "user_id" and "screen_name". So setting this value will result in an empty array.
\r
241 account/rate_limit_status
\r
249 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
251 ### Unsupported parameters
\r
256 Friendica doesn't allow showing friends of other users.
\r
261 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
263 ### Unsupported parameters
\r
268 Friendica doesn't allow showing followers of other users.
\r
280 * stringify_ids: Should the id numbers be sent as text (true) or number (false)? (default: false)
\r
282 ### Unsupported parameters
\r
287 Friendica doesn't allow showing friends of other users.
\r
295 * stringify_ids: Should the id numbers be sent as text (true) or number (false)? (default: false)
\r
297 ### Unsupported parameters
\r
302 Friendica doesn't allow showing followers of other users.
\r
304 direct_messages/new
\r
308 * user_id: id of the user
\r
309 * screen_name: screen name (for technical reasons, this value is not unique!)
\r
310 * text: The message
\r
311 * replyto: ID of the replied direct message
\r
312 * title: Title of the direct message
\r
314 direct_messages/conversation
\r
317 Shows all direct messages of a conversation
\r
319 * count: Items per page (default: 20)
\r
320 * page: page number
\r
321 * since_id: minimal id
\r
322 * max_id: maximum id
\r
323 * getText: Defines the format of the status field. Can be "html" or "plain"
\r
324 * uri: URI of the conversation
\r
326 direct_messages/all
\r
330 * count: Items per page (default: 20)
\r
331 * page: page number
\r
332 * since_id: minimal id
\r
333 * max_id: maximum id
\r
334 * getText: Defines the format of the status field. Can be "html" or "plain"
\r
336 direct_messages/sent
\r
340 * count: Items per page (default: 20)
\r
341 * page: page number
\r
342 * since_id: minimal id
\r
343 * max_id: maximum id
\r
344 * getText: Defines the format of the status field. Can be "html" or "plain"
\r
345 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
351 * count: Items per page (default: 20)
\r
352 * page: page number
\r
353 * since_id: minimal id
\r
354 * max_id: maximum id
\r
355 * getText: Defines the format of the status field. Can be "html" or "plain"
\r
356 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
358 ### Unsupported parameters
\r
361 oauth/request_token
\r
367 ### Unsupported parameters
\r
368 * x_auth_access_type
\r
376 ### Unsupported parameters
\r
381 Not Implemented API calls
\r
384 The following list is extracted from the [API source file](https://github.com/friendica/friendica/blob/master/include/api.php) (at the very bottom):
\r
386 * favorites/destroy
\r
387 * statuses/retweets_of_me
\r
388 * friendships/create
\r
389 * friendships/destroy
\r
390 * friendships/exists
\r
392 * account/update_location
\r
393 * account/update_profile_background_image
\r
394 * account/update_profile_image
\r
398 The following are things from the Twitter API also not implemented in StatusNet:
\r
399 * statuses/retweeted_to_me
\r
400 * statuses/retweeted_by_me
\r
401 * direct_messages/destroy
\r
402 * account/end_session
\r
403 * account/update_delivery_device
\r
404 * notifications/follow
\r
405 * notifications/leave
\r
416 Betamax has documentated some example API usage from a [bash script](https://en.wikipedia.org/wiki/Bash_(Unix_shell) employing [curl](https://en.wikipedia.org/wiki/CURL) (see [his posting](https://betamax65.de/display/betamax65/43539)).
\r
418 /usr/bin/curl -u USER:PASS https://YOUR.FRIENDICA.TLD/api/statuses/update.xml -d source="some source id" -d status="the status you want to post"
\r
423 The [RSStoFriedika](https://github.com/pafcu/RSStoFriendika) code can be used as an example of how to use the API with python.
\r
424 The lines for posting are located at [line 21](https://github.com/pafcu/RSStoFriendika/blob/master/RSStoFriendika.py#L21) and following.
\r
426 def tweet(server, message, group_allow=None):
\r
427 url = server + '/api/statuses/update'
\r
428 urllib2.urlopen(url, urllib.urlencode({'status': message,'group_allow[]':group_allow}, doseq=True))
\r
430 There is also a [module for python 3](https://bitbucket.org/tobiasd/python-friendica) for using the API.
\r