Documentation
¶
Index ¶
- type Account
- func (account *Account) DownloadVideoByClipID(networkID, syncModuleID int, manifestID, clipID, fileName string) error
- func (account *Account) DownloadVideosByPage(pages int, downloadDir string) error
- func (account *Account) GetCameras() ([]Camera, error)
- func (account *Account) GetListOfNetworks() (*[]Network, error)
- func (account *Account) GetLocalStorageManifest(networkID, syncModuleID int) (*LocalStorageManifest, error)
- func (account *Account) GetManifest() (*DeviceManifest, error)
- func (account *Account) GetMedia(sinceTimestamp string, pageNum int) (*AllMedia, error)
- func (account *Account) GetSyncModules() (*[]SyncModule, error)
- func (account *Account) GetVideoEvents(pages int) (*VideoEvents, error)
- func (account *Account) GetVideos(sinceTimestamp string, pageNum int) (*[]Video, error)
- func (account *Account) Login() (*LoginResponse, error)
- func (account *Account) Logout() error
- func (account *Account) RefreshToken() (*LoginResponse, error)
- func (account *Account) VerifyPin(pin string) (*VerifyResponse, error)
- type AllMedia
- type Camera
- type Clip
- type DeviceManifest
- type LocalStorageManifest
- type LoginResponse
- type Network
- type NetworkList
- type SyncModule
- type VerifyResponse
- type Video
- type VideoEvents
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Email string Password string AuthToken string Tier string UniqueID string ID int ClientID int }
func NewAccount ¶
Creates an account object that can be used to login
func (*Account) DownloadVideoByClipID ¶
func (*Account) DownloadVideosByPage ¶ added in v0.11.0
func (*Account) GetCameras ¶
Lists Cameras from manifest
func (*Account) GetListOfNetworks ¶
Lists networks and cameras
func (*Account) GetLocalStorageManifest ¶
func (account *Account) GetLocalStorageManifest(networkID, syncModuleID int) (*LocalStorageManifest, error)
Returns the local storage manifest, can take a little while depending on network availability Returns Object contaiting version, manifestID, and list of clips for sync module
func (*Account) GetManifest ¶
func (account *Account) GetManifest() (*DeviceManifest, error)
Returns full manifest of all networks, syncmodules, cameras, devices This is generally what you would use post login to then use information To download or other activities
func (*Account) GetSyncModules ¶
func (account *Account) GetSyncModules() (*[]SyncModule, error)
Returns sync modules from manifest
func (*Account) GetVideoEvents ¶
func (account *Account) GetVideoEvents(pages int) (*VideoEvents, error)
func (*Account) Login ¶
func (account *Account) Login() (*LoginResponse, error)
Completes a login request, might require a verify pin authentication as well
func (*Account) RefreshToken ¶
func (account *Account) RefreshToken() (*LoginResponse, error)
Fetches new auth token
type AllMedia ¶
type AllMedia struct { Limit int64 `json:"limit"` PurgeID int64 `json:"purge_id"` RefreshCount int64 `json:"refresh_count"` MediaList []struct { AdditionalDevices []interface{} `json:"additional_devices"` CreatedAt string `json:"created_at"` Deleted bool `json:"deleted"` Device string `json:"device"` DeviceID int64 `json:"device_id"` DeviceName string `json:"device_name"` ID int64 `json:"id"` Media string `json:"media"` NetworkID int64 `json:"network_id"` NetworkName string `json:"network_name"` Partial bool `json:"partial"` Source string `json:"source"` Thumbnail string `json:"thumbnail"` TimeZone string `json:"time_zone"` Type string `json:"type"` UpdatedAt string `json:"updated_at"` Watched bool `json:"watched"` } `json:"media"` Videos []Video `json:"videos"` }
type Camera ¶
type Camera struct { ID int `json:"id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Name string `json:"name"` Serial string `json:"serial"` FwVersion string `json:"fw_version"` Type string `json:"type"` Enabled bool `json:"enabled"` Thumbnail string `json:"thumbnail"` Status string `json:"status"` Battery string `json:"battery"` UsageRate bool `json:"usage_rate"` NetworkID int `json:"network_id"` Issues []interface{} `json:"issues"` Signals struct { Lfr int `json:"lfr"` Wifi int `json:"wifi"` Temp int `json:"temp"` Battery int `json:"battery"` } `json:"signals"` LocalStorageEnabled bool `json:"local_storage_enabled"` LocalStorageCompatible bool `json:"local_storage_compatible"` Snooze bool `json:"snooze"` SnoozeTimeRemaining interface{} `json:"snooze_time_remaining"` Revision string `json:"revision"` Color string `json:"color"` }
type DeviceManifest ¶
type DeviceManifest struct { Account struct { ID int `json:"id"` EmailVerified bool `json:"email_verified"` EmailVerificationRequired bool `json:"email_verification_required"` AmazonAccountLinked bool `json:"amazon_account_linked"` } `json:"account"` Networks []struct { ID int `json:"id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Name string `json:"name"` TimeZone string `json:"time_zone"` Dst bool `json:"dst"` Armed bool `json:"armed"` LvSave bool `json:"lv_save"` } `json:"networks"` SyncModules []SyncModule `json:"sync_modules"` Cameras []Camera `json:"cameras"` Sirens []interface{} `json:"sirens"` Chimes []interface{} `json:"chimes"` VideoStats struct { Storage int `json:"storage"` AutoDeleteDays int `json:"auto_delete_days"` AutoDeleteDayOptions []int `json:"auto_delete_day_options"` } `json:"video_stats"` DoorbellButtons []interface{} `json:"doorbell_buttons"` Owls []interface{} `json:"owls"` Doorbells []interface{} `json:"doorbells"` AppUpdates struct { Message string `json:"message"` Code int `json:"code"` UpdateAvailable bool `json:"update_available"` UpdateRequired bool `json:"update_required"` } `json:"app_updates"` DeviceLimits struct { Camera int `json:"camera"` Chime int `json:"chime"` Doorbell int `json:"doorbell"` DoorbellButton int `json:"doorbell_button"` Owl int `json:"owl"` Siren int `json:"siren"` TotalDevices int `json:"total_devices"` } `json:"device_limits"` WhatsNew struct { UpdatedAt int `json:"updated_at"` URL string `json:"url"` } `json:"whats_new"` Subscriptions struct { UpdatedAt time.Time `json:"updated_at"` } `json:"subscriptions"` Entitlements struct { UpdatedAt time.Time `json:"updated_at"` } `json:"entitlements"` TivLockEnable bool `json:"tiv_lock_enable"` TivLockStatus struct { Locked bool `json:"locked"` } `json:"tiv_lock_status"` Accessories struct { Storm []interface{} `json:"storm"` Rosie []interface{} `json:"rosie"` } `json:"accessories"` }
type LocalStorageManifest ¶
type LoginResponse ¶
type LoginResponse struct { Account struct { AccountID int `json:"account_id"` UserID int `json:"user_id"` ClientID int `json:"client_id"` ClientTrusted bool `json:"client_trusted"` NewAccount bool `json:"new_account"` Tier string `json:"tier"` Region string `json:"region"` AccountVerificationRequired bool `json:"account_verification_required"` PhoneVerificationRequired bool `json:"phone_verification_required"` ClientVerificationRequired bool `json:"client_verification_required"` RequireTrustClientDevice bool `json:"require_trust_client_device"` CountryRequired bool `json:"country_required"` VerificationChannel string `json:"verification_channel"` User struct { UserID int `json:"user_id"` Country string `json:"country"` } `json:"user"` AmazonAccountLinked bool `json:"amazon_account_linked"` } `json:"account"` Auth struct { Token string `json:"token"` } `json:"auth"` Phone struct { Number string `json:"number"` Last4Digits string `json:"last_4_digits"` CountryCallingCode string `json:"country_calling_code"` Valid bool `json:"valid"` } `json:"phone"` Verification struct { Email struct { Required bool `json:"required"` } `json:"email"` Phone struct { Required bool `json:"required"` Channel string `json:"channel"` } `json:"phone"` } `json:"verification"` LockoutTimeRemaining int `json:"lockout_time_remaining"` ForcePasswordReset bool `json:"force_password_reset"` AllowPinResendSeconds int `json:"allow_pin_resend_seconds"` }
type NetworkList ¶
type SyncModule ¶
type SyncModule struct { ID int `json:"id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Onboarded bool `json:"onboarded"` Status string `json:"status"` Name string `json:"name"` Serial string `json:"serial"` FwVersion string `json:"fw_version"` Type string `json:"type"` Subtype string `json:"subtype"` LastHb time.Time `json:"last_hb"` WifiStrength int `json:"wifi_strength"` NetworkID int `json:"network_id"` EnableTempAlerts bool `json:"enable_temp_alerts"` LocalStorageEnabled bool `json:"local_storage_enabled"` LocalStorageCompatible bool `json:"local_storage_compatible"` LocalStorageStatus string `json:"local_storage_status"` Revision string `json:"revision"` }
type VerifyResponse ¶
type Video ¶
type Video struct { AccountID int64 `json:"account_id"` Address string `json:"address"` CameraID int64 `json:"camera_id"` CameraName string `json:"camera_name"` CreatedAt string `json:"created_at"` Deleted bool `json:"deleted"` Description string `json:"description"` Encryption string `json:"encryption"` EncryptionKey interface{} `json:"encryption_key"` EventID interface{} `json:"event_id"` ID int64 `json:"id"` Length int64 `json:"length"` Locked bool `json:"locked"` NetworkID int64 `json:"network_id"` NetworkName string `json:"network_name"` Partial bool `json:"partial"` Ready bool `json:"ready"` Size int64 `json:"size"` StorageLocation string `json:"storage_location"` Thumbnail string `json:"thumbnail"` TimeZone string `json:"time_zone"` UpdatedAt string `json:"updated_at"` UploadTime int64 `json:"upload_time"` Viewed string `json:"viewed"` }
type VideoEvents ¶
Click to show internal directories.
Click to hide internal directories.