golift.io/starr@v1.0.0/radarr/radarr.go (about) 1 package radarr 2 3 import ( 4 "strings" 5 6 "golift.io/starr" 7 ) 8 9 // APIver is the Radarr API version supported by this library. 10 const APIver = "v3" 11 12 // Radarr contains all the methods to interact with a Radarr server. 13 type Radarr struct { 14 starr.APIer 15 } 16 17 // Filter values are integers. Given names for ease of discovery. 18 // https://github.com/Radarr/Radarr/blob/2bca1a71a2ed5130ea642343cb76250f3bf5bc4e/src/NzbDrone.Core/History/History.cs#L33-L44 19 // 20 //nolint:lll 21 const ( 22 FilterUnknown starr.Filtering = iota 23 FilterGrabbed 24 _ // 2 is unused 25 FilterDownloadFolderImported 26 FilterDownloadFailed 27 _ // 5 is unused. FilterDeleted 28 FilterFileDeleted 29 _ // FilterFolderImported // not used yet, 1/17/2022 30 FilterRenamed 31 FilterIgnored 32 ) 33 34 // New returns a Radarr object used to interact with the Radarr API. 35 func New(config *starr.Config) *Radarr { 36 if config.Client == nil { 37 config.Client = starr.Client(0, false) 38 } 39 40 config.URL = strings.TrimSuffix(config.URL, "/") 41 42 return &Radarr{APIer: config} 43 }