This repo is for helping our Technology Partners understand how to use our API. For more information please see our API Documentation.
You can install it locally by running
pip install -r requirements.txt
python <file>
Or you can run this inside of Docker
docker build --tag=apiexamples .
docker run -it apiexamples
make sure to edit the last line of Dockerfile
to run the correct file
The examples are now looking for local settings in a file named local_settings.py
It should contain the following:
# Enter your credentials
username = ""
password = ""
api_key = ""
File | Description |
---|---|
List_bridges_in_sub_accounts.py | Prints out the bridge information for all bridges in all sub-accounts |
List_bridges_and_cameras_in_sub_accounts.py | Prints out number of attached bridges and cameras in all sub-accounts |
List_camera_live_stream_URLs.py | format URL to play live stream |
Listen_for_thumbnails.py | subscribe to poll stream and listen for new thumbnails |
File | Description |
---|---|
Listen_for_Camera_Changes.py | Listen for camera settings change events using websockets to our poll stream |
Listen_for_previews.py | Listen for preview image events using websockets to our poll stream |
Listen_for_previews_long_polling.py | Listen for preview image events using long pollng to our poll stream |
Listen_for_roi_motion.py | Same as above but listening for ROI events |
Listen_for_thumbnails.py | Listen for thumbnail events using websockets to our poll stream |
Listen_for_status_changes.py | Subscribes to status changes for an account, simplified version |
Listen_for_status_masked_changes.py | Subscribes to masked status changes for an account, simplified version |
MP4_video_download.py | Shows how to login, get list of cameras, pull video clip from first camera |
Output_live_stream_URLs.py | format URL to play RTSP stream from camera |
Preview_download_latest_per_camera.py | Downloads the latest preview images from each camera |
Preview_downloader.py | Downloads all preview images between time range |
Preview_downloader_in_sub_account.py | Downloads all preview images in a sub-account between time range |
testing_poll_events.py | Listens for camera connect/disconnet events |
Webhook_video_download.py | Same as above but uses prefect API to get webhooks when video is in the cloud |