]> git.mxchange.org Git - friendica.git/blob - doc/api.md
profice a general content wrapper template.
[friendica.git] / doc / api.md
1 Friendica API\r
2 ===\r
3 The Friendica API aims to be compatible to the [GNU Social API](http://wiki.gnusocial.de/gnusocial:api) and the [Twitter API](https://dev.twitter.com/rest/public).\r
4 \r
5 Please refer to the linked documentation for further information.\r
6 \r
7 ## Implemented API calls\r
8 \r
9 ### General\r
10 #### HTTP Method\r
11 \r
12 API endpoints can restrict the method used to request them.\r
13 Using an invalid method results in HTTP error 405 "Method Not Allowed".\r
14 \r
15 In this document, the required method is listed after the endpoint name. "*" means every method can be used.\r
16 \r
17 #### Auth\r
18 \r
19 Friendica supports basic http auth and OAuth 1 to authenticate the user to the api.\r
20 \r
21 OAuth settings can be added by the user in web UI under /settings/oauth/\r
22 \r
23 In this document, endpoints which requires auth are marked with "AUTH" after endpoint name\r
24 \r
25 #### Unsupported parameters\r
26 * cursor: Not implemented in GNU Social\r
27 * trim_user: Not implemented in GNU Social\r
28 * contributor_details: Not implemented in GNU Social\r
29 * place_id: Not implemented in GNU Social\r
30 * display_coordinates: Not implemented in GNU Social\r
31 * include_rts: To-Do\r
32 * include_my_retweet: Retweets in Friendica are implemented in a different way\r
33 \r
34 #### Different behaviour\r
35 * 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
36 * include_entities: Default is "false". If set to "true" then the plain text is formatted so that links are having descriptions.\r
37 \r
38 #### Return values\r
39 * cid: Contact id of the user (important for "contact_allow" and "contact_deny")\r
40 * network: network of the user\r
41 \r
42 #### Errors\r
43 When an error occour in API call, an HTTP error code is returned, with an error message\r
44 Usually:\r
45 - 400 Bad Request: if parameter are missing or items can't be found\r
46 - 403 Forbidden: if authenticated user is missing\r
47 - 405 Method Not Allowed: if API was called with invalid method, eg. GET when API require POST\r
48 - 501 Not Implemented: if requested API doesn't exists\r
49 - 500 Internal Server Error: on other error contitions\r
50 \r
51 Error body is\r
52 \r
53 json:\r
54 ```\r
55         {\r
56                 "error": "Specific error message",\r
57                 "request": "API path requested",\r
58                 "code": "HTTP error code"\r
59         }\r
60 ```\r
61 \r
62 xml:\r
63 ```\r
64         <status>\r
65                 <error>Specific error message</error>\r
66                 <request>API path requested</request>\r
67                 <code>HTTP error code</code>\r
68         </status>\r
69 ```\r
70 \r
71 ---\r
72 ### account/rate_limit_status (*; AUTH)\r
73 \r
74 ---\r
75 ### account/verify_credentials (*; AUTH)\r
76 #### Parameters\r
77 \r
78 * skip_status: Don't show the "status" field. (Default: false)\r
79 * include_entities: "true" shows entities for pictures and links (Default: false)\r
80 \r
81 ---\r
82 ### conversation/show (*; AUTH)\r
83 Unofficial Twitter command. It shows all direct answers (excluding the original post) to a given id.\r
84 \r
85 #### Parameter\r
86 * id: id of the post\r
87 * count: Items per page (default: 20)\r
88 * page: page number\r
89 * since_id: minimal id\r
90 * max_id: maximum id\r
91 * include_entities: "true" shows entities for pictures and links (Default: false)\r
92 \r
93 #### Unsupported parameters\r
94 * include_rts\r
95 * trim_user\r
96 * contributor_details\r
97 \r
98 ---\r
99 ### direct_messages (*; AUTH)\r
100 #### Parameters\r
101 * count: Items per page (default: 20)\r
102 * page: page number\r
103 * since_id: minimal id\r
104 * max_id: maximum id\r
105 * getText: Defines the format of the status field. Can be "html" or "plain"\r
106 * include_entities: "true" shows entities for pictures and links (Default: false)\r
107 \r
108 #### Unsupported parameters\r
109 * skip_status\r
110 \r
111 ---\r
112 ### direct_messages/all (*; AUTH)\r
113 #### Parameters\r
114 * count: Items per page (default: 20)\r
115 * page: page number\r
116 * since_id: minimal id\r
117 * max_id: maximum id\r
118 * getText: Defines the format of the status field. Can be "html" or "plain"\r
119 \r
120 ---\r
121 ### direct_messages/conversation (*; AUTH)\r
122 Shows all direct messages of a conversation\r
123 #### Parameters\r
124 * count: Items per page (default: 20)\r
125 * page: page number\r
126 * since_id: minimal id\r
127 * max_id: maximum id\r
128 * getText: Defines the format of the status field. Can be "html" or "plain"\r
129 * uri: URI of the conversation\r
130 \r
131 ---\r
132 ### direct_messages/new (POST,PUT; AUTH)\r
133 #### Parameters\r
134 * user_id: id of the user\r
135 * screen_name: screen name (for technical reasons, this value is not unique!)\r
136 * text: The message\r
137 * replyto: ID of the replied direct message\r
138 * title: Title of the direct message\r
139 \r
140 ---\r
141 ### direct_messages/sent (*; AUTH)\r
142 #### Parameters\r
143 * count: Items per page (default: 20)\r
144 * page: page number\r
145 * since_id: minimal id\r
146 * max_id: maximum id\r
147 * getText: Defines the format of the status field. Can be "html" or "plain"\r
148 * include_entities: "true" shows entities for pictures and links (Default: false)\r
149 \r
150 ---\r
151 ### favorites (*; AUTH)\r
152 #### Parameters\r
153 * count: Items per page (default: 20)\r
154 * page: page number\r
155 * since_id: minimal id\r
156 * max_id: maximum id\r
157 * include_entities: "true" shows entities for pictures and links (Default: false)\r
158 \r
159 #### Unsupported parameters\r
160 * user_id\r
161 * screen_name\r
162 \r
163 Favorites aren't displayed to other users, so "user_id" and "screen_name" are unsupported.\r
164 Set this values will result in an empty array.\r
165 \r
166 ---\r
167 ### favorites/create (POST,PUT; AUTH)\r
168 #### Parameters\r
169 * id\r
170 * include_entities: "true" shows entities for pictures and links (Default: false)\r
171 \r
172 ---\r
173 ### favorites/destroy (POST,DELETE; AUTH)\r
174 #### Parameters\r
175 * id\r
176 * include_entities: "true" shows entities for pictures and links (Default: false)\r
177 \r
178 ---\r
179 ### followers/ids (*; AUTH)\r
180 #### Parameters\r
181 * stringify_ids: Should the id numbers be sent as text (true) or number (false)? (default: false)\r
182 \r
183 #### Unsupported parameters\r
184 * user_id\r
185 * screen_name\r
186 * cursor\r
187 \r
188 Friendica doesn't allow showing followers of other users.\r
189 \r
190 ---\r
191 ### friends/ids (*; AUTH)\r
192 #### Parameters\r
193 * stringify_ids: Should the id numbers be sent as text (true) or number (false)? (default: false)\r
194 \r
195 #### Unsupported parameters\r
196 * user_id\r
197 * screen_name\r
198 * cursor\r
199 \r
200 Friendica doesn't allow showing friends of other users.\r
201 \r
202 ---\r
203 ### help/test (*)\r
204 \r
205 ---\r
206 ### media/upload (POST,PUT; AUTH)\r
207 #### Parameters\r
208 * media: image data\r
209 \r
210 ---\r
211 ### oauth/request_token (*)\r
212 #### Parameters\r
213 * oauth_callback\r
214 \r
215 #### Unsupported parameters\r
216 * x_auth_access_type\r
217 \r
218 ---\r
219 ### oauth/access_token (*)\r
220 #### Parameters\r
221 * oauth_verifier\r
222 \r
223 #### Unsupported parameters\r
224 * x_auth_password\r
225 * x_auth_username\r
226 * x_auth_mode\r
227 \r
228 ---\r
229 ### statuses/destroy (POST,DELETE; AUTH)\r
230 #### Parameters\r
231 * id: message number\r
232 * include_entities: "true" shows entities for pictures and links (Default: false)\r
233 \r
234 #### Unsupported parameters\r
235 * trim_user\r
236 \r
237 ---\r
238 ### statuses/followers (*; AUTH)\r
239 \r
240 #### Parameters\r
241 \r
242 * include_entities: "true" shows entities for pictures and links (Default: false)\r
243 \r
244 ---\r
245 ### statuses/friends (*; AUTH)\r
246 \r
247 #### Parameters\r
248 \r
249 * include_entities: "true" shows entities for pictures and links (Default: false)\r
250 \r
251 ---\r
252 ### statuses/friends_timeline (*; AUTH)\r
253 #### Parameters\r
254 * count: Items per page (default: 20)\r
255 * page: page number\r
256 * since_id: minimal id\r
257 * max_id: maximum id\r
258 * exclude_replies: don't show replies (default: false)\r
259 * conversation_id: Shows all statuses of a given conversation.\r
260 * include_entities: "true" shows entities for pictures and links (Default: false)\r
261 \r
262 #### Unsupported parameters\r
263 * include_rts\r
264 * trim_user\r
265 * contributor_details\r
266 \r
267 ---\r
268 ### statuses/home_timeline (*; AUTH)\r
269 #### Parameters\r
270 * count: Items per page (default: 20)\r
271 * page: page number\r
272 * since_id: minimal id\r
273 * max_id: maximum id\r
274 * exclude_replies: don't show replies (default: false)\r
275 * conversation_id: Shows all statuses of a given conversation.\r
276 * include_entities: "true" shows entities for pictures and links (Default: false)\r
277 \r
278 #### Unsupported parameters\r
279 * include_rts\r
280 * trim_user\r
281 * contributor_details\r
282 \r
283 ---\r
284 ### statuses/mentions (*; AUTH)\r
285 #### Parameters\r
286 * count: Items per page (default: 20)\r
287 * page: page number\r
288 * since_id: minimal id\r
289 * max_id: maximum id\r
290 * include_entities: "true" shows entities for pictures and links (Default: false)\r
291 \r
292 #### Unsupported parameters\r
293 * include_rts\r
294 * trim_user\r
295 * contributor_details\r
296 \r
297 ---\r
298 ### statuses/public_timeline (*; AUTH)\r
299 #### Parameters\r
300 * count: Items per page (default: 20)\r
301 * page: page number\r
302 * since_id: minimal id\r
303 * max_id: maximum id\r
304 * exclude_replies: don't show replies (default: false)\r
305 * conversation_id: Shows all statuses of a given conversation.\r
306 * include_entities: "true" shows entities for pictures and links (Default: false)\r
307 \r
308 #### Unsupported parameters\r
309 * trim_user\r
310 \r
311 ---\r
312 ### statuses/replies (*; AUTH)\r
313 #### Parameters\r
314 * count: Items per page (default: 20)\r
315 * page: page number\r
316 * since_id: minimal id\r
317 * max_id: maximum id\r
318 * include_entities: "true" shows entities for pictures and links (Default: false)\r
319 \r
320 #### Unsupported parameters\r
321 * include_rts\r
322 * trim_user\r
323 * contributor_details\r
324 \r
325 ---\r
326 ### statuses/retweet (POST,PUT; AUTH)\r
327 #### Parameters\r
328 * id: message number\r
329 * include_entities: "true" shows entities for pictures and links (Default: false)\r
330 \r
331 #### Unsupported parameters\r
332 * trim_user\r
333 \r
334 ---\r
335 ### statuses/show (*; AUTH)\r
336 #### Parameters\r
337 * id: message number\r
338 * conversation: if set to "1" show all messages of the conversation with the given id\r
339 * include_entities: "true" shows entities for pictures and links (Default: false)\r
340 \r
341 #### Unsupported parameters\r
342 * include_my_retweet\r
343 * trim_user\r
344 \r
345 ---\r
346 ### statuses/update, statuses/update_with_media\r
347 #### Parameters\r
348 * title: Title of the status\r
349 * status: Status in text format\r
350 * htmlstatus: Status in HTML format\r
351 * in_reply_to_status_id\r
352 * lat: latitude\r
353 * long: longitude\r
354 * media: image data\r
355 * source: Application name\r
356 * group_allow\r
357 * contact_allow\r
358 * group_deny\r
359 * contact_deny\r
360 * network\r
361 * include_entities: "true" shows entities for pictures and links (Default: false)\r
362 * media_ids: (By now only a single value, no array)\r
363 \r
364 #### Unsupported parameters\r
365 * trim_user\r
366 * place_id\r
367 * display_coordinates\r
368 \r
369 ---\r
370 ### statuses/user_timeline (*; AUTH)\r
371 #### Parameters\r
372 * user_id: id of the user\r
373 * screen_name: screen name (for technical reasons, this value is not unique!)\r
374 * count: Items per page (default: 20)\r
375 * page: page number\r
376 * since_id: minimal id\r
377 * max_id: maximum id\r
378 * exclude_replies: don't show replies (default: false)\r
379 * conversation_id: Shows all statuses of a given conversation.\r
380 * include_entities: "true" shows entities for pictures and links (Default: false)\r
381 \r
382 #### Unsupported parameters\r
383 \r
384 * include_rts\r
385 * trim_user\r
386 * contributor_details\r
387 \r
388 ---\r
389 ### statusnet/config (*)\r
390 \r
391 ---\r
392 ### statusnet/conversation (*; AUTH)\r
393 It shows all direct answers (excluding the original post) to a given id.\r
394 \r
395 #### Parameter\r
396 * id: id of the post\r
397 * count: Items per page (default: 20)\r
398 * page: page number\r
399 * since_id: minimal id\r
400 * max_id: maximum id\r
401 * include_entities: "true" shows entities for pictures and links (Default: false)\r
402 \r
403 ---\r
404 ### statusnet/version (*)\r
405 \r
406 #### Unsupported parameters\r
407 * user_id\r
408 * screen_name\r
409 * cursor\r
410 \r
411 Friendica doesn't allow showing followers of other users.\r
412 \r
413 ---\r
414 ### users/search (*)\r
415 #### Parameters\r
416 * q: name of the user\r
417 \r
418 #### Unsupported parameters\r
419 * page\r
420 * count\r
421 * include_entities\r
422 \r
423 ---\r
424 ### users/show (*)\r
425 #### Parameters\r
426 * user_id: id of the user\r
427 * screen_name: screen name (for technical reasons, this value is not unique!)\r
428 * include_entities: "true" shows entities for pictures and links (Default: false)\r
429 \r
430 #### Unsupported parameters\r
431 * user_id\r
432 * screen_name\r
433 * cursor\r
434 \r
435 Friendica doesn't allow showing friends of other users.\r
436 \r
437 \r
438 ## Implemented API calls (not compatible with other APIs)\r
439 \r
440 \r
441 ---\r
442 ### friendica/activity/<verb>\r
443 #### parameters\r
444 * id: item id\r
445 \r
446 Add or remove an activity from an item.\r
447 'verb' can be one of:\r
448 \r
449 - like\r
450 - dislike\r
451 - attendyes\r
452 - attendno\r
453 - attendmaybe\r
454 \r
455 To remove an activity, prepend the verb with "un", eg. "unlike" or "undislike"\r
456 Attend verbs disable eachother: that means that if "attendyes" was added to an item, adding "attendno" remove previous "attendyes".\r
457 Attend verbs should be used only with event-related items (there is no check at the moment)\r
458 \r
459 #### Return values\r
460 \r
461 On success:\r
462 json\r
463 ```"ok"```\r
464 \r
465 xml\r
466 ```<ok>true</ok>```\r
467 \r
468 On error:\r
469 HTTP 400 BadRequest\r
470 \r
471 ---\r
472 ### friendica/group_show (*; AUTH)\r
473 Return all or a specified group of the user with the containing contacts as array.\r
474 \r
475 #### Parameters\r
476 * gid: optional, if not given, API returns all groups of the user\r
477 \r
478 #### Return values\r
479 Array of:\r
480 \r
481 * name: name of the group\r
482 * gid: id of the group\r
483 * user: array of group members (return from api_get_user() function for each member)\r
484 \r
485 \r
486 ---\r
487 ### friendica/group_delete (POST,DELETE; AUTH)\r
488 delete the specified group of contacts; API call need to include the correct gid AND name of the group to be deleted.\r
489 \r
490 #### Parameters\r
491 * gid: id of the group to be deleted\r
492 * name: name of the group to be deleted\r
493 \r
494 #### Return values\r
495 Array of:\r
496 \r
497 * success: true if successfully deleted\r
498 * gid: gid of the deleted group\r
499 * name: name of the deleted group\r
500 * status: â€ždeleted“ if successfully deleted\r
501 * wrong users: empty array\r
502 \r
503 \r
504 ---\r
505 ### friendica/group_create (POST,PUT; AUTH)\r
506 Create the group with the posted array of contacts as members.\r
507 \r
508 #### Parameters\r
509 * name: name of the group to be created\r
510 \r
511 #### POST data\r
512 JSON data as Array like the result of "users/group_show":\r
513 \r
514 * gid\r
515 * name\r
516 * array of users\r
517 \r
518 #### Return values\r
519 Array of:\r
520 \r
521 * success: true if successfully created or reactivated\r
522 * gid: gid of the created group\r
523 * name: name of the created group\r
524 * status: â€žmissing user“ | â€žreactivated“ | â€žok“\r
525 * wrong users: array of users, which were not available in the contact table\r
526 \r
527 \r
528 ---\r
529 ### friendica/group_update (POST)\r
530 Update the group with the posted array of contacts as members (post all members of the group to the call; function will remove members not posted).\r
531 \r
532 #### Parameters\r
533 * gid: id of the group to be changed\r
534 * name: name of the group to be changed\r
535 \r
536 #### POST data\r
537 JSON data as array like the result of â€žusers/group_show“:\r
538 \r
539 * gid\r
540 * name\r
541 * array of users\r
542 \r
543 #### Return values\r
544 Array of:\r
545 \r
546 * success: true if successfully updated\r
547 * gid: gid of the changed group\r
548 * name: name of the changed group\r
549 * status: â€žmissing user“ | â€žok“\r
550 * wrong users: array of users, which were not available in the contact table\r
551 \r
552 \r
553 \r
554 ---\r
555 ### friendica/notifications (GET)\r
556 Return last 50 notification for current user, ordered by date with unseen item on top\r
557 \r
558 #### Parameters\r
559 none\r
560 \r
561 #### Return values\r
562 Array of:\r
563 \r
564 * id: id of the note\r
565 * type: type of notification as int (see NOTIFY_* constants in boot.php)\r
566 * name: full name of the contact subject of the note\r
567 * url: contact's profile url\r
568 * photo: contact's profile photo\r
569 * date: datetime string of the note\r
570 * timestamp: timestamp of the node\r
571 * date_rel: relative date of the note (eg. "1 hour ago")\r
572 * msg: note message in bbcode\r
573 * msg_html: note message in html\r
574 * msg_plain: note message in plain text\r
575 * link: link to note\r
576 * seen: seen state: 0 or 1\r
577 \r
578 \r
579 ---\r
580 ### friendica/notifications/seen (POST)\r
581 Set note as seen, returns item object if possible\r
582 \r
583 #### Parameters\r
584 id: id of the note to set seen\r
585 \r
586 #### Return values\r
587 If the note is linked to an item, the item is returned, just like one of the "statuses/*_timeline" api.\r
588 \r
589 If the note is not linked to an item, a success status is returned:\r
590 \r
591 * "success" (json) | "&lt;status&gt;success&lt;/status&gt;" (xml)\r
592 \r
593 \r
594 ---\r
595 ### friendica/photo (*; AUTH)\r
596 #### Parameters\r
597 * photo_id: Resource id of a photo.\r
598 * scale: (optional) scale value of the photo\r
599 \r
600 Returns data of a picture with the given resource.\r
601 If 'scale' isn't provided, returned data include full url to each scale of the photo.\r
602 If 'scale' is set, returned data include image data base64 encoded.\r
603 \r
604 possibile scale value are:\r
605 \r
606 * 0: original or max size by server settings\r
607 * 1: image with or height at <= 640\r
608 * 2: image with or height at <= 320\r
609 * 3: thumbnail 160x160\r
610 * 4: Profile image at 175x175\r
611 * 5: Profile image at 80x80\r
612 * 6: Profile image at 48x48\r
613 \r
614 An image used as profile image has only scale 4-6, other images only 0-3\r
615 \r
616 #### Return values\r
617 \r
618 json\r
619 ```\r
620         {\r
621                 "id": "photo id"\r
622                 "created": "date(YYYY-MM-GG HH:MM:SS)",\r
623                 "edited": "date(YYYY-MM-GG HH:MM:SS)",\r
624                 "title": "photo title",\r
625                 "desc": "photo description",\r
626                 "album": "album name",\r
627                 "filename": "original file name",\r
628                 "type": "mime type",\r
629                 "height": "number",\r
630                 "width": "number",\r
631                 "profile": "1 if is profile photo",\r
632                 "link": {\r
633                         "<scale>": "url to image"\r
634                         ...\r
635                 },\r
636                 // if 'scale' is set\r
637                 "datasize": "size in byte",\r
638                 "data": "base64 encoded image data"\r
639         }\r
640 ```\r
641 \r
642 xml\r
643 ```\r
644         <photo>\r
645                 <id>photo id</id>\r
646                 <created>date(YYYY-MM-GG HH:MM:SS)</created>\r
647                 <edited>date(YYYY-MM-GG HH:MM:SS)</edited>\r
648                 <title>photo title</title>\r
649                 <desc>photo description</desc>\r
650                 <album>album name</album>\r
651                 <filename>original file name</filename>\r
652                 <type>mime type</type>\r
653                 <height>number</height>\r
654                 <width>number</width>\r
655                 <profile>1 if is profile photo</profile>\r
656                 <links type="array">\r
657                 <link type="mime type" scale="scale number" href="image url"/>\r
658                         ...\r
659                 </links>\r
660         </photo>\r
661 ```\r
662 \r
663 ---\r
664 ### friendica/photos/list (*; AUTH)\r
665 \r
666 Returns a list of all photo resources of the logged in user.\r
667 \r
668 #### Return values\r
669 \r
670 json\r
671 ```\r
672         [\r
673                 {\r
674                         id: "resource_id",\r
675                         album: "album name",\r
676                         filename: "original file name",\r
677                         type: "image mime type",\r
678                         thumb: "url to thumb sized image"\r
679                 },\r
680                 ...\r
681         ]\r
682 ```\r
683 \r
684 xml\r
685 ```\r
686         <photos type="array">\r
687                 <photo id="resource_id"\r
688                 album="album name"\r
689                 filename="original file name"\r
690                 type="image mime type">\r
691                         "url to thumb sized image"\r
692                 </photo>\r
693                 ...\r
694         </photos>\r
695 ```\r
696 \r
697 \r
698 ---\r
699 ## Not Implemented API calls\r
700 The following API calls are implemented in GNU Social but not in Friendica: (incomplete)\r
701 \r
702 * statuses/retweets_of_me\r
703 * friendships/create\r
704 * friendships/destroy\r
705 * friendships/exists\r
706 * friendships/show\r
707 * account/update_profile_background_image\r
708 * account/update_profile_image\r
709 * blocks/create\r
710 * blocks/destroy\r
711 \r
712 The following API calls from the Twitter API aren't implemented neither in Friendica nor in GNU Social:\r
713 \r
714 * statuses/mentions_timeline\r
715 * statuses/retweets/:id\r
716 * statuses/oembed\r
717 * statuses/retweeters/ids\r
718 * statuses/lookup\r
719 * direct_messages/show\r
720 * search/tweets\r
721 * direct_messages/destroy\r
722 * friendships/no_retweets/ids\r
723 * friendships/incoming\r
724 * friendships/outgoing\r
725 * friendships/update\r
726 * friends/list\r
727 * friendships/lookup\r
728 * account/settings\r
729 * account/update_delivery_device\r
730 * account/update_profile\r
731 * account/update_profile_background_image\r
732 * account/update_profile_image\r
733 * blocks/list\r
734 * blocks/ids\r
735 * users/lookup\r
736 * users/show\r
737 * users/search\r
738 * account/remove_profile_banner\r
739 * account/update_profile_banner\r
740 * users/profile_banner\r
741 * mutes/users/create\r
742 * mutes/users/destroy\r
743 * mutes/users/ids\r
744 * mutes/users/list\r
745 * users/suggestions/:slug\r
746 * users/suggestions\r
747 * users/suggestions/:slug/members\r
748 * favorites/list\r
749 * lists/list\r
750 * lists/statuses\r
751 * lists/members/destroy\r
752 * lists/memberships\r
753 * lists/subscribers\r
754 * lists/subscribers/create\r
755 * lists/subscribers/show\r
756 * lists/subscribers/destroy\r
757 * lists/members/create_all\r
758 * lists/members/show\r
759 * lists/members\r
760 * lists/members/create\r
761 * lists/destroy\r
762 * lists/update\r
763 * lists/create\r
764 * lists/show\r
765 * lists/subscriptions\r
766 * lists/members/destroy_all\r
767 * lists/ownerships\r
768 * saved_searches/list\r
769 * saved_searches/show/:id\r
770 * saved_searches/create\r
771 * saved_searches/destroy/:id\r
772 * geo/id/:place_id\r
773 * geo/reverse_geocode\r
774 * geo/search\r
775 * geo/place\r
776 * trends/place\r
777 * trends/available\r
778 * help/configuration\r
779 * help/languages\r
780 * help/privacy\r
781 * help/tos\r
782 * trends/closest\r
783 * users/report_spam\r
784 \r
785 ---\r
786 \r
787 ---\r
788 \r
789 ## Usage Examples\r
790 ### BASH / cURL\r
791 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
792 \r
793 /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
794 \r
795 ### Python\r
796 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
797 \r
798 def tweet(server, message, group_allow=None):\r
799 url = server + '/api/statuses/update'\r
800 urllib2.urlopen(url, urllib.urlencode({'status': message,'group_allow[]':group_allow}, doseq=True))\r
801 \r
802 There is also a [module for python 3](https://bitbucket.org/tobiasd/python-friendica) for using the API.\r