public StorageRequest(Folder folder, string fileName) { jsonapi = new Jsonapi { version = "1.0", }; data = new Data { type = "objects", attributes = new Data.Attributes { name = fileName }, relationships = new Data.Relationships { target = new Data.Relationships.Target { data = new Data.Relationships.Target.Data { type = "folders", id = folder.Json.id } } } }; }
public VersionRequest(string fileName, string storageId, string itemId) { jsonapi = new Jsonapi { version = "1.0" }; data = new Data { type = "versions", attributes = new Data.Attributes { name = fileName, extension = new Data.Attributes.Extension { type = "versions:autodesk.core:File", version = "1.0" } }, relationships = new Data.Relationships { item = new Data.Relationships.Item { data = new Data.Relationships.Item.Data { type = "items", id = itemId } }, storage = new Data.Relationships.Storage { data = new Data.Relationships.Storage.Data { type = "objects", id = storageId } } } }; }
public ItemRequest(string fileName, string itemId, int version, Folder parentFolder) { jsonapi = new Jsonapi { version = "1.0" }; data = new Data { type = "items", attributes = new Data.Attributes { displayName = fileName, extension = new Data.Attributes.Extension { type = "items:autodesk.core:File", version = "1.0" } }, relationships = new Data.Relationships { tip = new Data.Relationships.Tip { data = new Data.Relationships.Tip.Data { type = "versions", id = version.ToString() } }, parent = new Data.Relationships.Parent { data = new Data.Relationships.Parent.Data { type = "folders", id = parentFolder.Json.id } } } }; included = new List <Included>() { new Included { type = "versions", id = version.ToString(), attributes = new Included.Attributes { name = fileName, extension = new Included.Attributes.Extension { type = "versions:autodesk.core:File", version = "1.0" } }, relationships = new Included.Relationships { storage = new Included.Relationships.Storage { data = new Included.Relationships.Storage.Data { type = "objects", id = itemId } } } } }; }