public LinkedNotebook UpdateLinkedNotebook(LinkedNotebook ln) { lock (this) using (var httpClient = GetHttpClient()) { return(GetNoteStoreClient(httpClient).updateLinkedNotebook(this.authToken, ln)); } }
public LinkedNotebook CreateLinkedNotebook(LinkedNotebook linkedNotebook) { lock (this) using (var httpClient = GetHttpClient()) { return(GetNoteStoreClient(httpClient).createLinkedNotebook(this.authToken, linkedNotebook)); } }
internal static ENLinkedNotebookRef LinkedNotebookRefFromLinkedNotebook(LinkedNotebook linkedNotebook) { ENLinkedNotebookRef linkedNotebookRef = new ENLinkedNotebookRef(); linkedNotebookRef.Guid = linkedNotebook.Guid; linkedNotebookRef.NoteStoreUrl = linkedNotebook.NoteStoreUrl; linkedNotebookRef.ShardId = linkedNotebook.ShardId; linkedNotebookRef.SharedNotebookGlobalId = linkedNotebook.ShareKey; return(linkedNotebookRef); }
///** // * Every linked notebook requires its own note store client instance to access. // * // * @param linkedNotebook A linked notebook record for which you'd like a note store client. // * // * @return A client for the linked notebook's note store. // */ new public ENNoteStoreClient NoteStoreForLinkedNotebook(LinkedNotebook linkedNotebook) { return(base.NoteStoreForLinkedNotebook(linkedNotebook)); }
static void Main(string[] args) { string developerToken; if (args.Length > 0) { developerToken = args[0]; } else { Console.WriteLine("Enter developer token:"); developerToken = Console.ReadLine(); } string notestoreUrl; if (args.Length > 1) { notestoreUrl = args[1]; } else { Console.WriteLine("Enter note store URL:"); notestoreUrl = Console.ReadLine(); } string outputPath; if (args.Length > 2) { outputPath = args[2]; } else { Console.WriteLine("Enter output path:"); outputPath = Console.ReadLine(); } ENSessionAdvanced.SetSharedSessionDeveloperToken( developerToken, notestoreUrl); var session = ENSessionAdvanced.SharedSession; var notebooks = session.PrimaryNoteStore.ListLinkedNotebooks(); LinkedNotebook recipes = notebooks.First(notebook => notebook.ShareName == "recipes"); _recipesStore = session.NoteStoreForLinkedNotebook(recipes); var recipesByTag = new Dictionary <string, IList <string> >(); foreach (var note in FindNotes(new NoteFilter())) { foreach (string tagName in GetTagNames(note)) { IList <string> recipeNames; if (recipesByTag.TryGetValue(tagName, out recipeNames)) { string title = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(note.Title); recipeNames.Add(title); } else { recipeNames = new List <string> { note.Title }; recipesByTag[tagName] = recipeNames; } } } using (var writer = new StreamWriter(outputPath)) { WriteRecipesByTag(recipesByTag, writer); } }
// Constructor for a Business notebook internal ENNotebook(Notebook notebook, SharedNotebook sharedNotebook, LinkedNotebook linkedNotebook) { Notebook = notebook; SharedNotebook = sharedNotebook; LinkedNotebook = linkedNotebook; }
// Constructor for a Public notebook internal ENNotebook(Notebook publicNotebook, LinkedNotebook linkedNotebook) { Notebook = publicNotebook; SharedNotebook = null; LinkedNotebook = linkedNotebook; }
// Constructor for a Linked notebook internal ENNotebook(SharedNotebook sharedNotebook, LinkedNotebook linkedNotebook) { Notebook = null; SharedNotebook = sharedNotebook; LinkedNotebook = linkedNotebook; }
// Constructor for a Business notebook internal ENNotebook(Notebook notebook, SharedNotebook sharedNotebook, LinkedNotebook linkedNotebook) { this.Notebook = notebook; this.SharedNotebook = sharedNotebook; this.LinkedNotebook = linkedNotebook; }
// Constructor for a Public notebook internal ENNotebook(Notebook publicNotebook, LinkedNotebook linkedNotebook) { this.Notebook = publicNotebook; this.SharedNotebook = null; this.LinkedNotebook = linkedNotebook; }
// Constructor for a Linked notebook internal ENNotebook(SharedNotebook sharedNotebook, LinkedNotebook linkedNotebook) { this.Notebook = null; this.SharedNotebook = sharedNotebook; this.LinkedNotebook = linkedNotebook; }