Retrieving metadata

Metadata is the data which can be used to retrieve folders, files in folders, information about files, etc. You can read more about structure of metadata here:
https://www.dropbox.com/developers/docs#files

To retrieve information about root folder of your DropBox account please use next code:
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            Action<MetaData> callback = MetaDataRequest;

            DropBoxy.DropBoxyEngine engine = new DropBoxy.DropBoxyEngine();
            engine.ApiKey = "api key";
            engine.ApiSecret = "api secret";

            engine.SetToken("usertoken", "usersecret");

            engine.GetMetadata(string.Empty, callback);
        }

        void MetaDataRequest(MetaData metadata)
        { 
        
        }

engine.GetMetadata(string.Empty, callback); - to ask DropBox about metadata of root folder in your account. In case you want to retrieve information for Public folder, just use next engine.GetMetadata("/public", callback);

Using this method you can get information not only about a folder, but even about files which is stored in your DropBox account.

Last edited Jan 15, 2011 at 1:09 PM by dimko1, version 1

Comments

No comments yet.