Favorites

«  Return to the list of API methods

Contents

URL

http://yourserver/api/favorites.format

Description

It returns the last 25 favorite notes of the specified user

If no ?id parameter is defined, then the notes of the authenticated user will be shown

Available formats

RSS, XML, JSON

HTTP Method

GET

Requires authentication

YES

Required parameters

Optional parameters

Return example (XML)

curl http://yourserver/api/favorites.xml
<?xml version="1.0" encoding="UTF-8"?>
<statuses type="array">
 <status>
  <id>5</id>
  <created_at>Sat May 15 12:00:42 +0000 2010</created_at>
  <text>test</text>
  <source>web</source>
  <truncated>false</truncated>
  <in_reply_to_status_id/>
  <in_reply_to_user_id/>
  <favorited>true</favorited>
  <in_reply_to_screen_name/>
  <user>
   <id>2</id>
   <name>lorena</name>
   <screen_name>lorena</screen_name>
   <location/>
   <description/>
   <profile_image_url>http://yourserver/static/img/avatar/default_note.png</profile_image_url>
   <url/>
   <protected>true</protected>
   <followers_count>0</followers_count>
   <created_at>Sat May 15 12:00:07 +0000 2010</created_at>
   <favourites_count>0</favourites_count>
   <statuses_count>1</statuses_count>
   <friends_count>0</friends_count>
   <following>false</following>
   <utc_offset/>
   <geo_enabled>false</geo_enabled>
   <time_zone/>
   <profile_background_image_url>http://yourserver/themes/transparency/img/bg.png</profile_background_image_url>
   <profile_background_tile>false</profile_background_tile>
   <notifications>false</notifications>
   <verified>false</verified>
   <lang>en</lang>
   <contributors_enabled>false</contributors_enabled>
  </user>
 </status>
</statuses>

Return example (JSON)

curl http://yourserver/api/favorites.json
[
    {
        "id": 5,
        "created_at": "Sat May 15 12:00:42 +0000 2010",
        "text": "test",
        "source": "web",
        "truncated": false,
        "in_reply_to_status_id": null,
        "in_reply_to_user_id": null,
        "in_reply_to_screen_name": null,
        "geo": null,
        "favorited": false,
        "contributors": null,
        "coordinates": null,
        "user": {
            "id": 2,
            "name": "lorena",
            "screen_name": "lorena",
            "location": null,
            "description": "",
            "profile_image_url": "http:\/\/yourserver\/static\/img\/avatar\/default_note.png",
            "url": null,
            "protected": true,
            "followers_count": "0",
            "created_at": "Sat May 15 12:00:07 +0000 2010",
            "favourites_count": 0,
            "statuses_count": "1",
            "friends_count": "0",
            "following": false,
            "utc_offset": null,
            "time_zone": null,
            "profile_background_image_url": "http:\/\/yourserver\/themes\/transparency\/img\/bg.png",
            "profile_background_tile": false,
            "notifications": false,
            "verified": false,
            "lang": "en",
            "contributions_enabled": false,
            "geo_enabled": false
        }
    }
]

Return example (RSS)

curl http://yourserver/api/favorites.rss
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/">
 <channel>
  <title><![CDATA[mediacenter // Favorite notes of operador]]></title>
  <description><![CDATA[Favorite notes of operador]]></description>
  <link>http://yourserver/api/favorites.rss</link>
  <atom:link href="http://yourserver/api/favorites.rss" rel="self" type="application/rss+xml"/>
  <generator>Jisko</generator>
  <ttl>10</ttl>
  <image>
   <link>http://yourserver/</link>
   <title>Favorite notes of operador</title>
   <url>http://yourserver/static/img/logos/logo_23154c.png</url>
  </image>
  <item>
   <title><![CDATA[lorena: test]]></title>
   <description><![CDATA[lorena: test]]></description>
   <pubDate>Sat, 15 May 2010 14:00:42 +0200</pubDate>
   <link>http://yourserver/lorena/5</link>
   <guid>http://yourserver/lorena/5</guid>
   <dc:creator>lorena</dc:creator>
   <source url="http://yourserver/rss/profile?u=lorena">lorena's notes feed</source>
  </item>
 </channel>
</rss>