simplenote-vim / simplenote.py

Python API wrapper for the Simplenote web service

Home Page:http://readthedocs.org/docs/simplenotepy/en/latest/api.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update to the new Simperium API

atomicules opened this issue · comments

Since it has been out for awhile. I don't know what the plans are for the old one, but I guess it won't be kept forever.

An update: sent an email to Simperium on 16-Jan asking what needs to be done because their developer page states "You’ll need some special instructions before you can get started". Not heard anything back yet - I think that's quite typical. So this might take awhile.

Heard back and have the info needed.

Docs are here if anyone feels like helping out. I don't think the Simperium app id for Simplenote is public so won't include that here (although I'm guessing it's going to have to end up in the code at some point?).

Wonder if there is scope for utilising Simperium Python?

Just to add to the previous commit, that there are some significant differences between the Simplenote API and the Simperium API that are mentioned in the commit text itself.

I consider that commit as option 1 (wrapping around the Simperium python library).

I now plan on looking at option 2 which is using the Simperium HTTP end points directly. This is likely to take a few months as I'm busy with other things. However, there is no rush as far as I can see as the Simplenote website isn't yet ready for supporting 3rd party apps using the Simperium API as there is no way to get a token.

Just added a branch with option 2 which is using the Simperium HTTP library directly. I actually prefer this over option 1.

However, as previously mentioned there are lots of issues with switching to the Simperium API (tags, since, change of attribute names, removal of some attributes), not least that there isn't actually the ability to get a token from the Simplenote website yet. So I don't think we need to panic yet about switching, but it is probably good to have a bit of the ground work out of the way.

On hold because Simplenote seem to be in no rush to roll out this API so there is no way to properly use it yet.

@atomicules the "old" API seems to stop working. On get_token I receive a 400 code... Are you familiar with that?

@atomicules I'm using simplenote==1.0.3, with the same credentials I login in their web UI.

The code that fails is like so:

simplenote = simplenote.Simplenote(email, pswd)
simplenote.get_token()

Maybe they allow old users to use the old API, and don't allow new ones (I'm new).

Weird. Definitely not seeing issues here. Is this a new Simplenote
account? Wondering if it's something to do with that?

Can you run the tests ok? That uses a generic account.

The tests pass :)

I think this just shot up in importance. The generic account in the tests no longer seems to work (nor does my actual user account, for the record).

Well that sucks, especially because they never opened the new API.

Just noticed they updated this page: https://simplenote.com/developers/

Some older applications may still be using the legacy Simplenote API at https://simple-note.appspot.com. Note that this API has been deprecated and will no longer function after October 1, 2018.

A bit early with the shut off.

We give access to the Simperium API for Simplenote on a case-by-case basis.

My last email exchange with the Simplenote folk was 2014. When they said:

So on our end, we plan to allow users to grab a 3rd party API token from the Simplenote website (settings page). They could then use this with 3rd party apps that interact
directly with Simperium (the API token would be a Simperium auth token).

They never did that so the only way to use the Simperium API at the moment is:

To get your own token for dev right now, load the Simplenote web app: https://app.simplenote.com
Open the javascript console, and grab it from: "simperium_opts['token']"

Which is going to be annoying for everyone to do.

I'll email them again and see what the plans are.

Seems the Simperium API now does do authorisation... so will look at switching this over.

Hmm... we still need an API key though.

Will wait to hear what they say by email.

simperium tokens seem fairly persistent... so one way is just have people go grab it from the web api (via the web browser developer console). And we just use that for auth.

Well, now, this is interesting. Muscle memory induced an unintended retest of use of the old API, and thus did I discover it's working again. I guess someone there noticed after a week that it'd been accidentally shut down early or something.

Hopefully that means we've gone from "oh crap it's already gone" to "we've got about six weeks to make this happen".

I am mid "making this happen" as much as I can from my end. Not pushed anything up yet, but manually merging in all the changes that have occured since this branch: https://github.com/mrtazz/simplenote.py/tree/simperium-using-http

Almost have things working.

Work being tracked here: #22

Done.