MindTouch Developer Center > MindTouch Deki > API Reference > GET:users/{userid}/favorites/feed

GET:users/{userid}/favorites/feed

Overview

public. Retrieve feed of user favorites changes

Uri Parameters
NameTypeDescription
useridstringeither an integer user ID, "current", or "=" followed by a double uri-encoded user name
Query Parameters
NameTypeDescription
format{atom, digest, raw}?Format for feed (default: atom)
limitint?Number of changes to retrieve (default: 100)
offsetint?Skipped changes (default: 0)
sincestring?Start date for changes. Date is provided in 'yyyyMMddHHmmss' format (default: ignored).
Return Codes
NameValueDescription
BadRequest400Invalid input parameter or request body
Forbidden403Suscribe access to the page is required
NotFound404Requested user could not be found
Ok200The request completed successfully

Message Format

Output (Atom):  Refer to http://www.w3.org/2005/Atom

Output (Digest/Raw):

<table>
    <change>
        <rc_id>{int}</rc_id> 
        <rc_comment>{text}</rc_comment> 
        <rc_cur_id>{int}</rc_cur_id> 
        <rc_last_oldid>{int}</rc_last_oldid> 
        <rc_namespace>{int}</rc_namespace> 
        <rc_timestamp>{date}</rc_timestamp> 
        <rc_title>{text}</rc_title> 
        <rc_type>{int}</rc_type> 
        <rc_moved_to_ns>{int}</rc_moved_to_ns> 
        <rc_moved_to_title>{text}</rc_moved_to_title> 
        <rc_user_name>{text}</rc_user_name> 
        <rc_watched>{int}</rc_watched> 
        <rc_page_exists>{int}</rc_page_exists> 
        <edit_count>{int}</edit_count> 
    </change>
    ...
</table>

Implementation Notes

Whenever a user requests to watch a page, it is added into their favorites.

Atom and Digest formats retrieve a compressed summary of page changes, whereas the Raw format lists each change individually.

Code Samples

The following code example retrieves the feed of changes to the current user's watched pages:

Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
p.At("users", "current", "favorites", "feed").Get();

Sample response feed indicating that there was one watched page that was edited four times:

<feed xmlns="http://www.w3.org/2005/Atom" version="1.0" xml:lang="en-us">
    <generator version="1.3.99.4871">MindTouch Dream XAtom</generator> 
    <updated>2007-08-29T20:12:49Z</updated> 
    <title type="text">Admin's Favorites</title> 
    <link rel="self" href="http://deki-hayes/@api/deki/users/current/favorites/feed" /> 
    <id>http://deki-hayes/@api/deki/users/current/favorites/feed</id> 
    <entry>
        <title type="text">Page Title</title> 
        <published>2007-08-29T19:14:29Z</published> 
        <updated>2007-08-29T19:14:29Z</updated> 
        <id>http://deki-hayes/Page_Title</id> 
        <author>
            <name>Admin</name> 
        </author>
        <link href="http://deki-hayes/Page_Title" rel="alternate" /> 
        <summary type="xhtml">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Edited 4 times by Admin (added 'myfile.jpg')</p> 
                <p>
                    <strong>2 words added, 1 words removed</strong> 
                </p>
                <hr width="100%" size="2" /> 
                <p>
                    <ins style="color: #009900;background-color: #ccffcc;text-decoration: none;">new</ins> 
                    <del style="color: #990000;background-color: #ffcccc;text-decoration: none;">original</del> 
                    text 
                    <ins style="color: #009900;background-color: #ccffcc;text-decoration: none;">2</ins> 
                </p>
            </div>
        </summary>
    </entry>
</feed>
Tag page
You must login to post a comment.