kiwiz / gkeepapi

An unofficial client for the Google Keep API.
MIT License
1.53k stars 114 forks source link

watching for changes #78

Closed chrwei closed 4 years ago

chrwei commented 4 years ago

the Keep web page uses long polling to watch for note changes. has there been any attempt to use it to add a callback method to make use of it? is there a reason it can't be used?

the interesting relative URI is /client-channel/channel/bind?ctype=memento...

kiwiz commented 4 years ago

This library makes use of the mobile app endpoints, which are authenticated via OAuth as opposed to cookies. I ran a quick grep against the smali for channel/bind but didn't surface any matches.

It might be possible to trade OAuth tokens for cookies that would work for that endpoint. If I recall correctly, that might also allow us to upload media files as well.

velsa commented 4 years ago

Do you think it would be possible to poll the API for changes? E.g. every 15 seconds or maybe even every minute. I guess there's a chance though, that Google may consider it as abusing their API...

kiwiz commented 4 years ago

You can call sync() periodically - it's effectively what the clients all do.

kiwiz commented 4 years ago

Closing this out. If anyone has additional information to share, or wants to work on this, feel free to reopen.