} // constructor public Storage(string fileName, string folderId) { jsonapi = new JsonApi { version = "1.0", }; data = new Data { type = "objects", attributes = new Attributes { name = fileName }, relationships = new Relationships { target = new Target { data = new Data { type = "folders", id = folderId } } } }; } // constructor
public Version(string fileName, string storageId, string itemId) { jsonapi = new JsonApi { version = "1.0" }; data = new Data { type = "versions", attributes = new Attributes { name = fileName, extension = new Extension { //type = "versions:autodesk.core:File", type = "versions:autodesk.bim360:File", version = "1.0" } }, relationships = new Relationships { item = new Item { data = new Data { type = "items", id = itemId } }, storage = new Storage { data = new Data { type = "objects", id = storageId } } } }; }
} // constructor public Item(string fileName, string itemId, int iVersion, string parentFolderId) { jsonapi = new JsonApi { version = "1.0" }; data = new Data { type = "items", attributes = new Attributes { displayName = fileName, extension = new Extension { //type = "items:autodesk.core:File", type = "items:autodesk.bim360:File", version = "1.0" } // new Extension }, relationships = new Relationships { tip = new Tip { data = new Data { type = "versions", id = iVersion.ToString() } // new Data }, parent = new Parent { data = new Data { type = "folders", id = parentFolderId } // new Data } // new Parent } // new Relationships }; included = new List <Included>() { new Included { type = "versions", id = iVersion.ToString(), attributes = new Attributes { name = fileName, extension = new Extension { //type = "versions:autodesk.core:File", type = "versions:autodesk.bim360:File", version = "1.0" } // new Extension }, relationships = new Relationships { storage = new Storage { data = new Data { type = "objects", id = itemId } // new Data } // new Storage } // new Relationships } // new Included }; // new List<Included> } // constructor