GET:pages/popular

Overview

public. Retrieves a list of popular pages.

Uri Parameters

None

Query Parameters
NameTypeDescription
limituint?max number of results to return (default: 50)
offsetuint?offset
Return Codes
NameValueDescription
Ok200The request completed successfully

Message Format

Output:

<pages.popular count="{int}" href="{uri}">
    <page id="{int}" href="{uri}">
        <title>{text}</title> 
        <path>{text}</path> 
        <metrics>
            <metric.views>{int}</metric.views> 
        </metrics>
    </page>
    ...
</pages.popular>

Implementation Notes

Redirect and archived pages are not included in the output.

Code Samples

The following code example retrieves the popular pages:

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

Sample response indicating that there are two popular pages:

<pages.popular count="2" href="http://deki-hayes/@api/deki/pages/popular">
    <page id="29" href="http://deki-hayes/@api/deki/pages/29">
        <title>DekiWiki (Hayes)</title> 
        <path /> 
        <metrics>
            <metric.views>23</metric.views> 
        </metrics>
    </page>
    <page id="31" href="http://deki-hayes/@api/deki/pages/31">
        <title>Page Title</title> 
        <path>Page_Title</path> 
        <metrics>
            <metric.views>5</metric.views> 
        </metrics>
    </page>
</pages.popular>
Tag page
You must login to post a comment.
Powered by MindTouch Deki v.8.08