# `blinkpy.blinkpy`

blinkpy by Kevin Fronczak - A Blink camera Python library.

https://github.com/fronzbot/blinkpy Original protocol hacking by MattTW : https://github.com/MattTW/BlinkMonitorProtocol Published under the MIT license - See LICENSE file for more details. “Blink Wire-Free HS Home Monitoring & Alert Systems” is a trademark owned by Immedia Inc., see www.blinkforhome.com for more information. I am in no way affiliated with Blink, nor Immedia Inc.

class `blinkpy.blinkpy.``Blink`(username=None, password=None)

  Class to initialize communication and sync module.

  `arm`

    Return status of sync module: armed/disarmed.

  `camera_thumbs`

    Return camera thumbnails.

  `events`

    Get all events on server.

  `get_auth_token`()

    Retrieve the authentication token from Blink.

  `get_cameras`()

    Find and creates cameras.

  `get_ids`()

    Set the network ID and Account ID.

  `get_videos`(start_page=0, end_page=1)

    Retrieve last recorded videos per camera.

  `id_table`

    Return id/camera pairs.

  `login`()

    Prompt user for username and password.

  `online`

    Return boolean system online status.

  `refresh`()

    Get all blink cameras and pulls their most recent status.

  `set_links`()

    Set access links and required headers for each camera in system.

  `setup_system`()

    Perform full system setup.

    Method logs in and sets auth token, urls, and ids for future requests. Essentially this is just a wrapper function for ease of use.

  `summary`

    Get a full summary of device information.

  `video_count`

    Return number of videos on server.

  `videos`

    Return video list.

class `blinkpy.blinkpy.``BlinkCamera`(config, blink)

  Class to initialize individual camera.

  `armed`

    Return camera arm status.

  `battery_string`

    Return string indicating battery status.

  `image_refresh`()

    Refresh current thumbnail.

  `image_to_file`(path)

    Write image to file.

  `set_motion_detect`(enable)

    Set motion detection.

  `snap_picture`()

    Take a picture with camera to create a new thumbnail.

  `update`(values)

    Update camera information.

  `video_to_file`(path)

    Write video to file.

class `blinkpy.blinkpy.``BlinkURLHandler`(region_id)

  Class that handles Blink URLS.

`blinkpy.blinkpy.``_request`(blink, url='http://google.com', data=None, headers=None, reqtype='get', stream=False, json_resp=True, is_retry=False)

  Perform server requests and check if reauthorization neccessary.

`blinkpy.blinkpy.``_attempt_reauthorization`(blink)

  Attempt to refresh auth token and links.