- Created `client.go` for the main client structure and methods to interact with *arr services. - Added `types.go` to define data structures for system status, movies, and series. - Implemented `radarr.go` for Radarr-specific client methods including health checks and movie retrieval. - Introduced `interfaces.go` to define service interfaces for common operations across *arr services. - Established a basic `main.go` for application entry point. - Included a tutorial markdown file to guide users through building the client and understanding Go concepts. - Initialized `go.mod` for module management. - Organized code into appropriate packages for better structure and maintainability.
46 lines
1.4 KiB
Go
46 lines
1.4 KiB
Go
package main
|
|
|
|
import "time"
|
|
|
|
type SystemStatus struct {
|
|
Version string `json:"version"`
|
|
BuildTime string `json:"buildTime"`
|
|
IsDebug bool `json:"isDebug"`
|
|
IsProduction bool `json:"isProduction"`
|
|
IsAdmin bool `json:"isAdmin"`
|
|
IsUserInteractive bool `json:"isUserInteractive"`
|
|
StartupPath string `json:"startupPath"`
|
|
AppData string `json:"appData"`
|
|
OsName string `json:"osName"`
|
|
OSVersion string `json:"osVersion"`
|
|
}
|
|
|
|
type Movie struct {
|
|
ID int `json:"id"`
|
|
Title string `json:"title"`
|
|
Year int `json:"year"`
|
|
Path string `json:"path"`
|
|
Monitored bool `json:"monitored"`
|
|
Added time.Time `json:"added"`
|
|
QualityProfileID int `json:"qualityProfileId"`
|
|
ImdbID string `json:"imdbId"`
|
|
RmdbID int `json:"tmdbId"`
|
|
}
|
|
|
|
type Series struct {
|
|
ID int `json:"id"`
|
|
Title string `json:"title"`
|
|
Year int `json:"year"`
|
|
Path string `json:"path"`
|
|
Monitored bool `json:"monitored"`
|
|
Added time.Time `json:"added"`
|
|
QualityProfileID int `json:"qualityProfileId"`
|
|
TvdbID int `json:"tvdbId"`
|
|
Seasons []Season `json:"seasons"`
|
|
}
|
|
|
|
type Season struct {
|
|
SeasonNumber int `json:"seasonNumber"`
|
|
Monitored bool `json:"monitored"`
|
|
}
|