Was this page helpful?

Retrieve File Property Info

    Description of the code sample

    The following code authenticates and retrieves information about a file property named 'foo' .

    Sample Code

    Plug p = Plug.New("http://devwiki/@api/deki"); 
    p.At("users", "authenticate")
     .WithCredentials("sysop", "password").Get(); 
    XDoc ret = p.At("files", "42", "properties", "foo", "info")
     .Get().AsDocument();

    Sample Response from executing Code

    <property name="foo" href="http://devwiki/@api/deki/files/42/properties/foo/info" etag="4463.r1_ts2009-03-20T22:48:15Z">
      <contents type="text/plain; charset=utf-8" href="http://devwiki/@api/deki/files/42/properties/foo">My Value</contents>
      <date.modified>2009-03-20T22:48:15Z</date.modified>
      <user.modified id="1" href="http://devwiki/@api/deki/users/1">
        <nick>Sysop</nick>
        <username>Sysop</username>
      </user.modified>
      <change-description>initial value</change-description>
    </property>

    Implementation notes 

    Add notes about requirements or config values

    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by