public. Retrieve information about a user.
Output:
<user id="{int}" href="{uri}">
<nick>{text}</nick>
<username>{text}</username>
<email>{text}</email>
<page.home id="{int}" href="{int}">
<title>{text}</title>
<path>{text}</path>
</page.home>
<fullname />
<status>{active|inactive}</status>
<date.lastlogin>{date}</date.lastlogin>
<service.authentication id="{int}" href="{uri]" />
<permissions.user>
<operations mask="{int}">{text}</operations>
<role id="{int}" href="{uri}">{text}</role>
</permissions.user>
<permissions.effective>
<operations mask="{int}">{text}</operations>
</permissions.effective>
<groups count="{int}" href="{uri}">
<group id="{int}" href="{uri}">
<name>{text}</name>
<service.authentication id="{int}" href="{uri}" />
<users count="{int}" href="{uri}" />
<permissions.group>
<operations mask="{int}">{text}</operations>
<role id="{int}" href="{uri}">{text}</role>
</permissions.group>
</group>
...
</groups>
</user>The following code example retrieves the current user:
Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
p.At("users", "current").Get(); Sample response with information about the current user, Admin:
<user id="1" href="http://deki-hayes/@api/deki/users/1">
<nick>Admin</nick>
<username>Admin</username>
<email>admin@mindtouch.com</email>
<page.home id="30" href="http://deki-hayes/@api/deki/pages/30">
<title>User:Admin</title>
<path>User:Admin</path>
</page.home>
<fullname></fullname>
<status>active</status>
<date.lastlogin>2007-08-30T17:26:32Z</date.lastlogin>
<service.authentication id="1" href="http://deki-hayes/@api/deki/site/services/1" />
<permissions.user>
<operations mask="9223372036854779903">LOGIN,BROWSE,READ,SUBSCRIBE,UPDATE,CREATE,DELETE,CHANGEPERMISSIONS,CONTROLPANEL,ADMIN</operations>
<role id="5" href="http://deki-hayes/@api/deki/site/roles/5">Admin</role>
</permissions.user>
<permissions.effective>
<operations mask="9223372036854779903">LOGIN,BROWSE,READ,SUBSCRIBE,UPDATE,CREATE,DELETE,CHANGEPERMISSIONS,CONTROLPANEL,ADMIN</operations>
</permissions.effective>
<groups />
</user>