Help us shape the future of Go! Take the 2026 Go Developer Survey

shinobiclient

package module
v0.0.0-...-2088634 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2019 License: MIT Imports: 7 Imported by: 1

README

shinobi-alerter

a way to alert to shinobi ip camera software

Config example

config.json

{
	"server": "https://shinobi.video",
	"apikey": "oEhEEeUWaTLA92xiY9oXq9BGK5QdvE",
	"cameras": [
		{
			"name": "Frontdoor-01",
			"ip": "10.1.1.2",
			"group": "bPBPi7PLzg",
			"region": "front"
		},{
			"name": "Driveway-01",
			"ip": "10.1.1.3",
			"group": "bPBPi7PLzg",
			"region": "g1iU3"
		}
	]
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Shinobi

type Shinobi struct {
	// contains filtered or unexported fields
}

func (*Shinobi) GetMonitors

func (sa *Shinobi) GetMonitors(cameraGroup string) (string, error)

func (*Shinobi) GetStartedMonitors

func (sa *Shinobi) GetStartedMonitors(cameraGroup string) (string, error)

func (*Shinobi) GetVideos

func (sa *Shinobi) GetVideos(cameraGroup string) (string, error)

func (*Shinobi) GetVideosById

func (sa *Shinobi) GetVideosById(cameraGroup string, cameraID string, query string) (string, error)

func (*Shinobi) RunRequest

func (sa *Shinobi) RunRequest(httpMethod string, URL string, apiPath string, queryParam string) (string, error)

func (*Shinobi) TriggerMotion

func (sa *Shinobi) TriggerMotion(host string) (string, error)

type ShinobiCamera

type ShinobiCamera struct {
	Name   string `json:"name"`
	IP     string `json:"ip"`
	Group  string `json:"group"`
	Region string `json:"region"`
}

type ShinobiClient

type ShinobiClient interface {
	TriggerMotion(string) (string, error)
	GetMonitors(string) (string, error)
	GetVideos(string) (string, error)
	GetVideosById(string, string, string) (string, error)
	GetStartedMonitors(string) (string, error)
	RunRequest(string, string, string, string) (string, error)
}

func New

func New(config string) ShinobiClient

type ShinobiConfig

type ShinobiConfig struct {
	Server  string          `json:"server"`
	Apikey  string          `json:"apikey"`
	Cameras []ShinobiCamera `json:"cameras"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL