blink icon indicating copy to clipboard operation
blink copied to clipboard

API Has Changed

Open Vitiell0 opened this issue 6 years ago • 1 comments

The API has changed, I was inspecting it last night and found this new structure.

blink new api

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.

Vitiell0 avatar Jun 04 '18 12:06 Vitiell0

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.

wesleywh avatar Aug 12 '18 01:08 wesleywh