/// <summary> /// Updates task link. /// </summary> /// <param name="name">The name of the file.</param> /// <param name="index">Task link index</param> /// <param name="fileName">The name of the project document to save changes to. If this parameter is omitted then the changes will be saved to the source project document.</param> /// <param name="folder">The document folder.</param> /// <param name="storage">The document storage.</param> public void UpdatesTaskLink(string name, int index, string fileName, string folder, TaskLink taskLink, string storage = "") { // PUT tasks/{name}/taskLinks/{index}?appSid={appSid}&storage={storage}&folder={folder}&fileName={fileName} string apiUrl = string.Format(@"tasks/{0}/taskLinks/{1}?storage={2}&folder={3}&fileName={4}", name, index, storage, folder, fileName); ServiceController.Put(apiUrl, AppSid, AppKey, JsonConvert.SerializeObject(taskLink)); }
/// <summary> /// Adds a new task link to a project. /// </summary> /// <param name="name">The name of the file.</param> /// <param name="fileName">The name of the project document to save changes to. If this parameter is omitted then the changes will be saved to the source project document.</param> /// <param name="folder">The document folder.</param> /// <param name="storage">The document storage.</param> public void AddNewTaskLinkToAProject(string name, string fileName, string folder, TaskLink taskLink, string storage = "") { // POST tasks/{name}/taskLinks?appSid={appSid}&storage={storage}&folder={folder}&fileName={fileName} string apiUrl = string.Format(@"tasks/{0}/taskLinks?storage={1}&folder={2}&fileName={3}", name, storage, folder, fileName); ServiceController.Post(apiUrl, AppSid, AppKey, JsonConvert.SerializeObject(taskLink)); }