Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b33b27463 | ||
|
|
e0f6384dde | ||
|
|
6cbfe1440a | ||
|
|
b68b639d57 | ||
|
|
83dd8b0a24 | ||
|
|
96730f3879 | ||
|
|
50e5e8c82d | ||
|
|
38df3a8f9d | ||
|
|
b3f95b9231 |
+1
-3
@@ -17,8 +17,6 @@ import requests
|
||||
import getpass
|
||||
import json
|
||||
|
||||
__version__ = '0.4.1'
|
||||
|
||||
BLINK_URL = 'immedia-semi.com'
|
||||
LOGIN_URL = 'https://prod.' + BLINK_URL + '/login'
|
||||
BASE_URL = 'https://prod.' + BLINK_URL
|
||||
@@ -262,7 +260,7 @@ class Blink(object):
|
||||
"""Gets all events on server"""
|
||||
url = BASE_URL + '/events/network/' + self._NETWORKID
|
||||
headers = self._AUTH_HEADER
|
||||
self._EVENTS = _request(url, headers=headers, type='get')['events']
|
||||
self._EVENTS = _request(url, headers=headers, type='get')['event']
|
||||
return self._EVENTS
|
||||
|
||||
@property
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from blinkpy import __version__
|
||||
from setuptools import setup
|
||||
|
||||
setup(
|
||||
name = 'blinkpy',
|
||||
version = __version__,
|
||||
version = '0.4.',
|
||||
description = 'A Blink camera Python library',
|
||||
long_description='A library that communicates with Blink cameras',
|
||||
author = 'Kevin Fronczak',
|
||||
@@ -13,7 +12,7 @@ setup(
|
||||
license='MIT',
|
||||
url = 'https://github.com/fronzbot/blinkpy',
|
||||
py_modules=['blinkpy'],
|
||||
install_requires=['requests'],
|
||||
install_requires=['requests>=2,<3'],
|
||||
classifiers=[
|
||||
'Development Status :: 4 - Beta',
|
||||
'Intended Audience :: Developers',
|
||||
|
||||
+76
-8
@@ -18,6 +18,7 @@ THUMB = '/url/camera/7777/clip'
|
||||
THUMB2 = '/url/camera/8888/clip'
|
||||
NOTIFS = 1
|
||||
NOTIFS2 = 1
|
||||
SYNC_ID = 1000
|
||||
|
||||
if ISONLINE:
|
||||
ONLINE = 'online'
|
||||
@@ -63,7 +64,7 @@ response = {'account': {'notifications': 1},
|
||||
{'updated_at': '2017-01-26T19:32:10+00:00',
|
||||
'device_type': 'sync_module',
|
||||
'notifications': 0,
|
||||
'device_id': 0000,
|
||||
'device_id': SYNC_ID,
|
||||
'status':
|
||||
'online',
|
||||
'last_hb':
|
||||
@@ -77,13 +78,80 @@ response = {'account': {'notifications': 1},
|
||||
'error_msg': '',
|
||||
'name': 'Blink',
|
||||
'notifications': NOTIFS,
|
||||
'status': 'ok'},
|
||||
'events': [{'camera_id':DEVICE_ID,
|
||||
'type':'motion',
|
||||
'video_url':THUMB + '.mp4',
|
||||
'created_at':'2017-01-01'},
|
||||
{'camera_id':DEVICE_ID2,
|
||||
'type':'None'}],
|
||||
'status': 'ok'},
|
||||
'event': [{'camera_name': CAMERA_NAME,
|
||||
'updated_at': '2017-01-28T19:51:52+00:00',
|
||||
'sync_module_id': None,
|
||||
'camera': DEVICE_ID,
|
||||
'type': 'motion',
|
||||
'duration': None,
|
||||
'status': None,
|
||||
'created_at': '2017-01-28T19:51:52+00:00',
|
||||
'camera_id': DEVICE_ID,
|
||||
'id': 123456789,
|
||||
'siren_id': None,
|
||||
'account_id': ACCOUNT_ID,
|
||||
'notified': True,
|
||||
'siren': None,
|
||||
'syncmodule': None,
|
||||
'video_url': THUMB+'.mp4',
|
||||
'command_id': None,
|
||||
'network_id': None,
|
||||
'account': ACCOUNT_ID,
|
||||
'video_id': 100000001},
|
||||
{'updated_at': '2017-01-28T19:51:29+00:00',
|
||||
'sync_module_id': SYNC_ID,
|
||||
'camera': None,
|
||||
'type': 'armed',
|
||||
'duration': None,
|
||||
'status': None,
|
||||
'created_at':
|
||||
'2017-01-28T19:51:29+00:00',
|
||||
'camera_id': None,
|
||||
'id': 123456789,
|
||||
'siren_id': None,
|
||||
'account_id': ACCOUNT_ID,
|
||||
'notified': False,
|
||||
'siren': None,
|
||||
'syncmodule': SYNC_ID,
|
||||
'command_id': None,
|
||||
'network_id': None,
|
||||
'account': ACCOUNT_ID},
|
||||
{'updated_at': '2017-01-28T19:00:12+00:00',
|
||||
'sync_module_id': SYNC_ID,
|
||||
'camera': None,
|
||||
'type': 'disarmed',
|
||||
'duration': None,
|
||||
'status': None,
|
||||
'created_at': '2017-01-28T19:00:12+00:00',
|
||||
'camera_id': None,
|
||||
'id': 123456789,
|
||||
'siren_id': None,
|
||||
'account_id': 2463,
|
||||
'notified': False,
|
||||
'siren': None,
|
||||
'syncmodule': SYNC_ID,
|
||||
'command_id': None,
|
||||
'network_id': None,
|
||||
'account': ACCOUNT_ID},
|
||||
{'camera_name': CAMERA_NAME,
|
||||
'updated_at': '2017-01-28T18:59:55+00:00',
|
||||
'sync_module_id': None,
|
||||
'camera': DEVICE_ID,
|
||||
'type': 'motion',
|
||||
'duration': None,
|
||||
'status': None,
|
||||
'created_at': '2017-01-28T18:59:55+00:00',
|
||||
'camera_id': DEVICE_ID,
|
||||
'id': 123456789,
|
||||
'siren_id': None,
|
||||
'account_id': ACCOUNT_ID,
|
||||
'notified': True,
|
||||
'siren': None,
|
||||
'syncmodule': None,
|
||||
'command_id': None,
|
||||
'network_id': None,
|
||||
'account': ACCOUNT_ID}],
|
||||
'syncmodule':{'name':'SyncName',
|
||||
'status':ONLINE}}
|
||||
|
||||
Reference in New Issue
Block a user