public static bool NoteGet(int notebookid, string notebookpass, int noteid, ref Tuple<int, string, string> note) { var input = new NoteGetInput() { NotebookId = notebookid, NotebookPass = notebookpass, NoteId = noteid, }; var json = JsonConvert.SerializeObject(input); string output = null; try { output = HttpReader.HttpPost(ApiDef.NoteGet, json); } catch (AggregateException) { return false; } var result = JsonConvert.DeserializeObject<NoteGetOutput>(output); var issuccess = ResultStatus.IsSuccess(result.ResultStatus); if (issuccess) { note = Tuple.Create(result.Result.type, result.Result.name, result.Result.data); } return issuccess; }
public static bool NoteGet(int notebookid, string notebookpass, int noteid, ref Note note) { var input = new NoteGetInput() { NotebookId = notebookid, NotebookPass = notebookpass, NoteId = noteid, }; var json = JsonConvert.SerializeObject(input); var output = HttpReader.HttpPost(ApiDef.NoteGet, json); var result = JsonConvert.DeserializeObject<NoteGetOutput>(output); var issuccess = ResultStatus.IsSuccess(result.ResultStatus); if (issuccess) { note = result.Result; } return issuccess; }
public static Note GetNote(int notebookid, string notebookpass, int noteid) { var notegetinput = new NoteGetInput() { NotebookId = notebookid, NotebookPass = notebookpass, NoteId = noteid, }; var output = notemodule.OnNoteGet(JsonConvert.SerializeObject(notegetinput)); var notegetoutput = JsonConvert.DeserializeObject<NoteGetOutput>(output); return notegetoutput.Result; }