/// <summary> /// Update Note /// </summary> /// <example> /// { /// "Name":"Name", /// "Description":"Description", /// "Parent": { "Id": "parentid" }, /// } /// </example> /// <remarks> /// Updates a Note object /// </remarks> /// <param name="id"></param> /// <param name="note"></param> /// <param name="notify"></param> /// <returns> /// The modified Note object /// </returns> public IQuery<Note> UpdateNote(string id, Note note, bool notify = false) { var sfApiQuery = new ShareFile.Api.Client.Requests.Query<Note>(Client); sfApiQuery.From("Items"); sfApiQuery.Action("Note"); sfApiQuery.ActionIds(id); sfApiQuery.QueryString("notify", notify); sfApiQuery.Body = note; sfApiQuery.HttpMethod = "PATCH"; return sfApiQuery; }
/// <summary> /// Create Note /// </summary> /// <example> /// { /// "Name":"Note Name", /// "Description":"Description" /// } /// </example> /// <remarks> /// Creates a new Note. /// </remarks> /// <param name="parentUrl"></param> /// <param name="note"></param> /// <returns> /// the new Note /// </returns> public IQuery<Note> CreateNote(Uri parentUrl, Note note) { var sfApiQuery = new ShareFile.Api.Client.Requests.Query<Note>(Client); sfApiQuery.Action("Note"); sfApiQuery.Uri(parentUrl); sfApiQuery.Body = note; sfApiQuery.HttpMethod = "POST"; return sfApiQuery; }