arlo-go/responses.go

73 lines
1.2 KiB
Go
Raw Normal View History

package arlo
2017-12-09 03:55:38 +00:00
2020-05-27 11:35:02 +00:00
type BaseResponse struct {
Success bool `json:"success"`
}
2020-05-27 11:35:02 +00:00
type ErrorDetail struct {
Message string `json:"message"`
Reason string `json:"reason"`
Error string `json:"error"`
}
type ErrorResponse struct {
BaseResponse
ErrorDetail `json:"data,omitempty"`
}
2017-12-09 03:55:38 +00:00
type LoginResponse struct {
2020-05-27 11:35:02 +00:00
BaseResponse
Data Account `json:"data"`
2017-12-09 03:55:38 +00:00
}
type SessionResponse struct {
2020-05-27 11:35:02 +00:00
BaseResponse
Data Session `json:"data"`
}
type UserProfileResponse struct {
2020-05-27 11:35:02 +00:00
BaseResponse
Data UserProfile `json:"data"`
}
2017-12-09 03:55:38 +00:00
type DeviceResponse struct {
2020-05-27 11:35:02 +00:00
BaseResponse
Data []Device `json:"data"`
2017-12-09 03:55:38 +00:00
}
// LibraryMetaDataResponse is an intermediate struct used when parsing data from the GetLibraryMetaData() call.
type LibraryMetaDataResponse struct {
2020-05-27 11:35:02 +00:00
BaseResponse
Data LibraryMetaData `json:"data"`
2017-12-09 03:55:38 +00:00
}
type LibraryResponse struct {
2020-05-27 11:35:02 +00:00
BaseResponse
Data Library `json:"data"`
2017-12-10 19:17:09 +00:00
}
type CvrPlaylistResponse struct {
2020-05-27 11:35:02 +00:00
BaseResponse
Data CvrPlaylist `json:"data"`
}
type Stream struct {
2018-09-22 19:22:42 +00:00
URL string `json:"url"`
}
type StreamResponse struct {
2020-05-27 11:35:02 +00:00
BaseResponse
Data Stream `json:"data"`
}
type RecordingResponse struct {
2020-05-27 11:35:02 +00:00
BaseResponse
Data Stream `json:"data"`
}
type EventStreamResponse struct {
EventStreamPayload
2020-05-27 08:49:40 +00:00
Status string `json:"status,omitempty"`
RawProperties []byte
2017-12-09 03:55:38 +00:00
}