Was this page helpful?

Retrieve File Properties

    Description of the code sample

    The following code authenticates and retrieves all properties belonging to a file.

    Sample Code

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

    Sample Response from executing Code

    <properties count="1" href="http://devwiki/@api/deki/files/42/properties">
      <property name="myprop" href="http://devwiki/@api/deki/files/42/properties/myprop/info" etag="4465.r2_ts2009-03-20T23:52:50Z">
        <contents type="text/plain" href="http://devwiki/@api/deki/files/42/properties/myprop">new value for property</contents>
        <date.modified>2009-03-20T23:52:50Z</date.modified>
        <user.modified id="1" href="http://devwiki/@api/deki/users/1">
          <nick>Sysop</nick>
          <username>Sysop</username>
        </user.modified>
        <change-description>description of change</change-description>
      </property>
    </properties>

    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