Esempio n. 1
0
        public static NextcloudNote GetNoteData(ISimpleJsonRest web, int id, NextcloudConfig config)
        {
            var result = web.Get <ApiNoteResult>("notes/" + id);

            var rnote = new NextcloudNote(result.id, Guid.NewGuid(), config)
            {
                CreationDate    = DateTime.Now,
                RemoteTimestamp = result.modified,
                Content         = result.content,
                Favorite        = result.favorite,
                Path            = ExtractPathFromCategory(result.category),
                ETag            = result.etag,
            };

            rnote.SetModificationDate(ConvertFromEpochDate(result.modified));
            return(rnote);
        }
Esempio n. 2
0
// ReSharper restore All
#pragma warning restore 0649

        public static List <NoteRef> ListNotes(ISimpleJsonRest web)
        {
            return(web.Get <List <NoteRef> >("notes", "exclude=title,category,content,favorite"));
        }