blink
blink copied to clipboard
API Has Changed
The API has changed, I was inspecting it last night and found this new structure.
For example, to get a list of videos you can call something like https://rest-u001.immedia-semi.com/api/v2/videos/changed?since=2018-06-01T23:11:21+0000&page=1
with your AUTH_TOKEN set in the headers.
I was able to use this library to login and get the AUTH_TOKEN but could not return a list of events.
Thanks for this. I was able to get a quick work around by changing the events function to look like this:
def events(self, network, type='motion'):
self._connect_if_needed()
resp = requests.get(self._path('api/v2/videos/changed?since=2018-06-01T23:11:21+0000&page=1'), headers=self._auth_headers)
events = resp.json()
return events
This will obviously break a few other things but it can be a good starting point for people.