1 Implemented API calls
\r
3 The Friendica API aims to be compatible to the [GNU Social API](http://skilledtests.com/wiki/Twitter-compatible_API) and the [Twitter API](https://dev.twitter.com/rest/public).
\r
5 Please refer to the linked documentation for further information.
\r
7 ## Implemented API calls
\r
10 #### Unsupported parameters
\r
11 * cursor: Not implemented in GNU Social
\r
12 * trim_user: Not implemented in GNU Social
\r
13 * contributor_details: Not implemented in GNU Social
\r
14 * place_id: Not implemented in GNU Social
\r
15 * display_coordinates: Not implemented in GNU Social
\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/rate_limit_status
\r
29 ### 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 ### conversation/show
\r
35 Unofficial Twitter command. It shows all direct answers (excluding the original post) to a given id.
\r
38 * id: id of the post
\r
39 * count: Items per page (default: 20)
\r
41 * since_id: minimal id
\r
42 * max_id: maximum id
\r
43 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
45 #### Unsupported parameters
\r
48 * contributor_details
\r
52 * count: Items per page (default: 20)
\r
54 * since_id: minimal id
\r
55 * max_id: maximum id
\r
56 * getText: Defines the format of the status field. Can be "html" or "plain"
\r
57 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
59 #### Unsupported parameters
\r
62 ### direct_messages/all
\r
64 * count: Items per page (default: 20)
\r
66 * since_id: minimal id
\r
67 * max_id: maximum id
\r
68 * getText: Defines the format of the status field. Can be "html" or "plain"
\r
70 ### direct_messages/conversation
\r
71 Shows all direct messages of a conversation
\r
73 * count: Items per page (default: 20)
\r
75 * since_id: minimal id
\r
76 * max_id: maximum id
\r
77 * getText: Defines the format of the status field. Can be "html" or "plain"
\r
78 * uri: URI of the conversation
\r
80 ### direct_messages/new
\r
82 * user_id: id of the user
\r
83 * screen_name: screen name (for technical reasons, this value is not unique!)
\r
85 * replyto: ID of the replied direct message
\r
86 * title: Title of the direct message
\r
88 ### direct_messages/sent
\r
90 * count: Items per page (default: 20)
\r
92 * since_id: minimal id
\r
93 * max_id: maximum id
\r
94 * getText: Defines the format of the status field. Can be "html" or "plain"
\r
95 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
99 * count: Items per page (default: 20)
\r
100 * page: page number
\r
101 * since_id: minimal id
\r
102 * max_id: maximum id
\r
103 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
105 #### Unsupported parameters
\r
109 Favorites aren't displayed to other users, so "user_id" and "screen_name". So setting this value will result in an empty array.
\r
111 ### favorites/create
\r
114 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
116 ### favorites/destroy
\r
119 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
123 * stringify_ids: Should the id numbers be sent as text (true) or number (false)? (default: false)
\r
125 #### Unsupported parameters
\r
130 Friendica doesn't allow showing followers of other users.
\r
132 ### friendica/photo
\r
134 * photo_id: Resource id of a photo.
\r
136 Returns data of a picture with the given resource.
\r
138 ### friendica/photos/list
\r
140 Returns a list of all photo resources of the logged in user.
\r
144 * stringify_ids: Should the id numbers be sent as text (true) or number (false)? (default: false)
\r
146 #### Unsupported parameters
\r
151 Friendica doesn't allow showing friends of other users.
\r
157 * media: image data
\r
159 ### oauth/request_token
\r
163 #### Unsupported parameters
\r
164 * x_auth_access_type
\r
166 ### oauth/access_token
\r
170 #### Unsupported parameters
\r
175 ### statuses/destroy
\r
177 * id: message number
\r
178 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
180 #### Unsupported parameters
\r
183 ### statuses/followers
\r
184 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
186 ### statuses/friends
\r
187 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
189 ### statuses/friends_timeline
\r
191 * count: Items per page (default: 20)
\r
192 * page: page number
\r
193 * since_id: minimal id
\r
194 * max_id: maximum id
\r
195 * exclude_replies: don't show replies (default: false)
\r
196 * conversation_id: Shows all statuses of a given conversation.
\r
197 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
199 #### Unsupported parameters
\r
202 * contributor_details
\r
204 ### statuses/home_timeline
\r
206 * count: Items per page (default: 20)
\r
207 * page: page number
\r
208 * since_id: minimal id
\r
209 * max_id: maximum id
\r
210 * exclude_replies: don't show replies (default: false)
\r
211 * conversation_id: Shows all statuses of a given conversation.
\r
212 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
214 #### Unsupported parameters
\r
217 * contributor_details
\r
219 ### statuses/mentions
\r
221 * count: Items per page (default: 20)
\r
222 * page: page number
\r
223 * since_id: minimal id
\r
224 * max_id: maximum id
\r
225 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
227 #### Unsupported parameters
\r
230 * contributor_details
\r
232 ### statuses/public_timeline
\r
234 * count: Items per page (default: 20)
\r
235 * page: page number
\r
236 * since_id: minimal id
\r
237 * max_id: maximum id
\r
238 * exclude_replies: don't show replies (default: false)
\r
239 * conversation_id: Shows all statuses of a given conversation.
\r
240 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
242 #### Unsupported parameters
\r
245 ### statuses/replies
\r
247 * count: Items per page (default: 20)
\r
248 * page: page number
\r
249 * since_id: minimal id
\r
250 * max_id: maximum id
\r
251 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
253 #### Unsupported parameters
\r
256 * contributor_details
\r
258 ### statuses/retweet
\r
260 * id: message number
\r
261 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
263 #### Unsupported parameters
\r
268 * id: message number
\r
269 * conversation: if set to "1" show all messages of the conversation with the given id
\r
270 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
272 #### Unsupported parameters
\r
273 * include_my_retweet
\r
276 ### statuses/update, statuses/update_with_media
\r
278 * title: Title of the status
\r
279 * status: Status in text format
\r
280 * htmlstatus: Status in HTML format
\r
281 * in_reply_to_status_id
\r
284 * media: image data
\r
285 * source: Application name
\r
291 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
292 * media_ids: (By now only a single value, no array)
\r
294 #### Unsupported parameters
\r
297 * display_coordinates
\r
299 ### statuses/user_timeline
\r
301 * user_id: id of the user
\r
302 * screen_name: screen name (for technical reasons, this value is not unique!)
\r
303 * count: Items per page (default: 20)
\r
304 * page: page number
\r
305 * since_id: minimal id
\r
306 * max_id: maximum id
\r
307 * exclude_replies: don't show replies (default: false)
\r
308 * conversation_id: Shows all statuses of a given conversation.
\r
309 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
311 #### Unsupported parameters
\r
314 * contributor_details
\r
316 ### statusnet/config
\r
318 ### statusnet/version
\r
320 #### Unsupported parameters
\r
325 Friendica doesn't allow showing followers of other users.
\r
329 * q: name of the user
\r
331 #### Unsupported parameters
\r
338 * user_id: id of the user
\r
339 * screen_name: screen name (for technical reasons, this value is not unique!)
\r
340 * include_entities: "true" shows entities for pictures and links (Default: false)
\r
342 #### Unsupported parameters
\r
347 Friendica doesn't allow showing friends of other users.
\r
349 ## Not Implemented API calls
\r
350 The following API calls are implemented in GNU Social but not in Friendica: (incomplete)
\r
352 * statuses/retweets_of_me
\r
353 * friendships/create
\r
354 * friendships/destroy
\r
355 * friendships/exists
\r
357 * account/update_profile_background_image
\r
358 * account/update_profile_image
\r
362 The following API calls from the Twitter API aren't implemented neither in Friendica nor in GNU Social:
\r
364 * statuses/mentions_timeline
\r
365 * statuses/retweets/:id
\r
367 * statuses/retweeters/ids
\r
369 * direct_messages/show
\r
371 * direct_messages/destroy
\r
372 * friendships/no_retweets/ids
\r
373 * friendships/incoming
\r
374 * friendships/outgoing
\r
375 * friendships/update
\r
377 * friendships/lookup
\r
379 * account/update_delivery_device
\r
380 * account/update_profile
\r
381 * account/update_profile_background_image
\r
382 * account/update_profile_image
\r
388 * account/remove_profile_banner
\r
389 * account/update_profile_banner
\r
390 * users/profile_banner
\r
391 * mutes/users/create
\r
392 * mutes/users/destroy
\r
395 * users/suggestions/:slug
\r
396 * users/suggestions
\r
397 * users/suggestions/:slug/members
\r
401 * lists/members/destroy
\r
402 * lists/memberships
\r
403 * lists/subscribers
\r
404 * lists/subscribers/create
\r
405 * lists/subscribers/show
\r
406 * lists/subscribers/destroy
\r
407 * lists/members/create_all
\r
408 * lists/members/show
\r
410 * lists/members/create
\r
415 * lists/subscriptions
\r
416 * lists/members/destroy_all
\r
418 * saved_searches/list
\r
419 * saved_searches/show/:id
\r
420 * saved_searches/create
\r
421 * saved_searches/destroy/:id
\r
423 * geo/reverse_geocode
\r
428 * help/configuration
\r
433 * users/report_spam
\r
437 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
439 /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
442 The [RSStoFriedika](https://github.com/pafcu/RSStoFriendika) code can be used as an example of how to use the API with python. The lines for posting are located at [line 21](https://github.com/pafcu/RSStoFriendika/blob/master/RSStoFriendika.py#L21) and following.
\r
444 def tweet(server, message, group_allow=None):
\r
445 url = server + '/api/statuses/update'
\r
446 urllib2.urlopen(url, urllib.urlencode({'status': message,'group_allow[]':group_allow}, doseq=True))
\r
448 There is also a [module for python 3](https://bitbucket.org/tobiasd/python-friendica) for using the API.
\r