Closed ShwetankSaraf closed 8 years ago
Hi @ShwetankSaraf,
You might want to check out the API documentation for custom metadata. Essentially, you'll need to register the schema for your metadata then it can be passed to the API just like any other facet on the item.
To pass additional data via the SDK, you can add the custom value to the AdditionalData dictionary on an item when you send it via AddAsync or UpdateAsync. For example:
var folderToCreate = new Item
{
Name = "folder name",
Folder = new Folder(),
AdditionalData = new Dictionary<string, object>
{
{ "customFacet", new CustomFacet { Name = "value" } }
}
};
var newFolder = await client.Drive.Items[parentId].Children.Request().AddAsync(folderToCreate);
Thanks. I assume I need to register customFacet first by sending client ID and schema. parentId - > folder under this files will be created Here 'clinet' stands for ?
I need to try setting custom properties to files in onedrive. I think /update API may help for this. What things we need to set/get custom properties to onedrive files?