Closed atomicules closed 11 years ago
Hmm I'd have to dig into this but I'm not aware of any API changes.
The API index indeed seems to return the oldest notes first (based on modifydate). I asked on the API mailing list and when this is the true, we'll need to find a better way to implement this functionality.
I asked on the API mailing list
Thanks. I lost access to the API group when I deleted my Gmail account. I'm thinking it might be better to use something like -l 2012-09-25
and just return all notes modified since a date rather than trying to return a set number. After all, the reason why I went with the "limit list" thing was that I wanted a way to return my most recent notes quickly.
quote from the API mailing list:
The order is arbitrary (not guaranteed), but will mostly conform to order the notes were created in. In the new Simperium API interface for Simplenote, the order is by most recently modified.
So we can't really rely on the order. Although I will also look into the Simperium API, maybe it makes sense to switch to it.
Sorry for the delay. This is the kind of thing I was thinking (implemented in simplenote.py), rather than have get_note_list(qty)
have get_note_list("YYYY-MM-DD")
:
https://github.com/atomicules/simplenote.py/commit/6e0c3115f8705c9b4e27cb7ad95f49337e67846e
What do you think?
Looks pretty good to me. I somehow totally overlooked that the API provides a since
parameter.
Ok, I'll finish off the changes in simplenote.py
(tests and README) and then make the necessary changes in simplenote.vim
.
Couldn't re-open this pull request, but merged in here: https://github.com/mrtazz/simplenote.vim/commit/69ee0d483b2a52df619430b6970d365936ff3eeb
You can assign this one to me.
Previously doing something like
:Simplenote -l 10
worked really well for me and returned the 10 most recent notes. However, now by limiting the number of notes fetched to 10 I will end up with just one note being listed in Vim (because the other 9 fetched will have the "deleted" flag set). I don't know if it is because something has changed in the API or whether it's because I've more deleted notes.I thought the API returned the note index starting with the most recent note? I'm sure that is how it worked when I added in the "limit list" bit. However, now it seems to return the oldest note first and since a lot of my older notes are more likely to have the "deleted" flag set that's why I end up with one note, etc being displayed. The only API doc I've got access to is v2.1.5. Do you know if there have been any changes since this?
The limit list functionality in Simplenote.py works, but the problem with how I implemented it in Simplenote.vim is that I did not appreciate or take into account that Simplenote.vim filters the returned list for display.
So... there are two problems
Perhaps I'd be better scrapping the "limit list" idea and using the "modified since" option in the API for a way of limiting the notes returned?