Evernote.EDAM.NoteStore.NoteStore.Client.listNotebooks C# (CSharp) Method

listNotebooks() public method

public listNotebooks ( string authenticationToken ) : List
authenticationToken string
return List
      public List<Evernote.EDAM.Type.Notebook> listNotebooks(string authenticationToken)
      {
        #if !SILVERLIGHT && !NETFX_CORE
        send_listNotebooks(authenticationToken);
        return recv_listNotebooks();

        #else
        var asyncResult = Begin_listNotebooks(null, null, authenticationToken);
        return End_listNotebooks(asyncResult);

        #endif
      }
      #if SILVERLIGHT || NETFX_CORE

Usage Example

        public IEnumerable<EverNote> GetDefaultNoteBookNotes(string authToken)
        {
            var noteStoreUrl = GetNoteStoreUrl(authToken);
            var transport = new THttpClient(new Uri(noteStoreUrl));
            var protocol = new TBinaryProtocol(transport);
            var noteStore = new NoteStore.Client(protocol);
            var notes = new List<EverNote>();

            var notebooks = noteStore.listNotebooks(authToken);

            foreach (Notebook notebook in notebooks)
            {
                if (notebook.DefaultNotebook)
                {
                    var findResult = noteStore.findNotes(authToken, new NoteFilter { NotebookGuid = notebook.Guid }, 0, int.MaxValue);
                    foreach (var note in findResult.Notes)
                    {
                        notes.Add(new EverNote(note.Guid, note.Title));
                    }
                    break;
                }
            }

            return notes;
        }
All Usage Examples Of Evernote.EDAM.NoteStore.NoteStore.Client::listNotebooks
NoteStore.Client