Statuses/friends
« Return to the list of API methods
Contents |
URL
http://yourserver/api/statuses/friends.format
Description
It returns the user info of the last 100 users the authentificated user is following.
They are ordered by the order in which the user followed them.
Available formats
XML, JSON
HTTP Method
GET
Requires authentication
YES
Optional parameters
- screen_name: It retrieves the user info of the users which the provided user is following. It has to be an username. Example: http://yourserver/api/statuses/friends.xml?screen_name=abcdefg
- user_id: It retrieves the user info of the users which the provided user is following. It has to be an user ID. Example: http://yourserver/api/statuses/friends.json?user_id=2
- id: It retrieves the user info of the users which the provided user is following. It can be an username or an user ID. Example: http://yourserver/api/statuses/friends.json?user_id=2
- page: The page you want to see. Example: http://yourserver/statuses/friends.json?page=2
Return example (XML)
curl http://yourserver/api/statuses/friends.xml
<?xml version="1.0" encoding="UTF-8"?> <users type="array"> <user> <id>2</id> <name>lorena</name> <screen_name>lorena</screen_name> <location/> <description/> <profile_image_url>http://localhost/trunk/static/img/avatar/default_note.png</profile_image_url> <url/> <protected>true</protected> <followers_count>1</followers_count> <created_at>Fri Apr 16 20:13:05 +0000 2010</created_at> <favourites_count>1</favourites_count> <statuses_count>7</statuses_count> <friends_count>0</friends_count> <following>true</following> <utc_offset/> <geo_enabled>false</geo_enabled> <time_zone/> <profile_background_image_url>http://localhost/trunk/themes/transparency/img/bg.png</profile_background_image_url> <profile_background_tile>false</profile_background_tile> <notifications>false</notifications> <verified>false</verified> <lang>default</lang> <contributors_enabled>false</contributors_enabled> <status> <created_at>Sat Apr 17 12:13:37 +0000 2010</created_at> <id>31</id> <text>@marcosgdf abc</text> <source>web</source> <truncated>false</truncated> <in_reply_to_status_id>28</in_reply_to_status_id> <in_reply_to_user_id>1</in_reply_to_user_id> <favorited>false</favorited> <in_reply_to_screen_name>marcosgdf</in_reply_to_screen_name> </status> </user> </users>
Return example (JSON)
curl http://yourserver/api/statuses/friends.json
[ { "id": 2, "name": "lorena", "screen_name": "lorena", "location": null, "description": "", "profile_image_url": "http:\/\/localhost\/trunk\/static\/img\/avatar\/default_note.png", "url": null, "protected": true, "followers_count": "1", "created_at": "Fri Apr 16 20:13:05 +0000 2010", "favourites_count": "1", "statuses_count": "7", "friends_count": "0", "following": true, "utc_offset": null, "time_zone": null, "profile_background_image_url": "http:\/\/localhost\/trunk\/themes\/transparency\/img\/bg.png", "profile_background_tile": false, "notifications": false, "verified": false, "lang": "default", "contributions_enabled": false, "geo_enabled": false, "status": { "created_at": "Sat Apr 17 12:13:37 +0000 2010", "id": "31", "source": "web", "truncated": false, "in_reply_to_status_id": "28", "in_reply_to_user_id": "1", "favorited": false, "in_reply_to_screen_name": "marcosgdf", "text": "@marcosgdf abc" } } ]

