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

getNote() public method

public getNote ( string authenticationToken, string guid, bool withContent, bool withResourcesData, bool withResourcesRecognition, bool withResourcesAlternateData ) : Evernote.EDAM.Type.Note
authenticationToken string
guid string
withContent bool
withResourcesData bool
withResourcesRecognition bool
withResourcesAlternateData bool
return Evernote.EDAM.Type.Note
      public Evernote.EDAM.Type.Note getNote(string authenticationToken, string guid, bool withContent, bool withResourcesData, bool withResourcesRecognition, bool withResourcesAlternateData)
      {
        #if !SILVERLIGHT && !NETFX_CORE
        send_getNote(authenticationToken, guid, withContent, withResourcesData, withResourcesRecognition, withResourcesAlternateData);
        return recv_getNote();

        #else
        var asyncResult = Begin_getNote(null, null, authenticationToken, guid, withContent, withResourcesData, withResourcesRecognition, withResourcesAlternateData);
        return End_getNote(asyncResult);

        #endif
      }
      #if SILVERLIGHT || NETFX_CORE

Usage Example

        public string GetNoteContent(string authToken, string noteId)
        {
            var noteStoreUrl = GetNoteStoreUrl(authToken);
            var transport = new THttpClient(new Uri(noteStoreUrl));
            var protocol = new TBinaryProtocol(transport);
            var noteStore = new NoteStore.Client(protocol);

            var note = noteStore.getNote(authToken, noteId, false, false, false, false);
            var body = noteStore.getNoteSearchText(authToken, noteId, false, false);

            if (!string.IsNullOrEmpty(body))
            {
                var index = body.LastIndexOf(note.Title);
                if (index > 0)
                {
                    body = body.Substring(0, index);
                }
                body = body.Trim();
            }

            return body;
        }
NoteStore.Client