golift.io/starr@v1.0.0/README.md (about)

     1  # Starr
     2  
     3  [![GoDoc](https://godoc.org/golift.io/starr/svc?status.svg)](https://pkg.go.dev/golift.io/starr)
     4  [![Go Report Card](https://goreportcard.com/badge/golift.io/starr)](https://goreportcard.com/report/golift.io/starr)
     5  [![MIT License](http://img.shields.io/:license-mit-blue.svg)](https://github.com/golift/starr/blob/main/LICENSE)
     6  [![discord](https://badgen.net/badge/icon/Discord?color=0011ff&label&icon=https://simpleicons.now.sh/discord/eee "GoLift Discord")](https://golift.io/discord)
     7  
     8  ## The correct way to say `*arr`.
     9  
    10   **Go library to interact with APIs in all the Starr apps.**
    11  
    12  -   [Lidarr](http://lidarr.audio) ([over 80 methods](https://pkg.go.dev/golift.io/starr@main/lidarr))
    13  -   [Prowlarr](https://prowlarr.com) ([over 20 methods](https://pkg.go.dev/golift.io/starr@main/prowlarr))
    14  -   [Radarr](http://radarr.video) ([over 100 methods](https://pkg.go.dev/golift.io/starr@main/radarr))
    15  -   [Readarr](http://readarr.com) ([over 70 methods](https://pkg.go.dev/golift.io/starr@main/readarr))
    16  -   [Sonarr](http://sonarr.tv) ([over 100 methods](https://pkg.go.dev/golift.io/starr@main/sonarr))
    17  
    18  [Custom Scripts support](https://wiki.servarr.com/radarr/custom-scripts) is also included.
    19  [Check out the types and methods](https://pkg.go.dev/golift.io/starr@main/starrcmd) to get that data.
    20  
    21  ## One 🌟 To Rule Them All
    22  
    23  This library is slowly updated as new methods are needed or requested. If you have
    24  specific needs this library doesn't currently meet, but should or could, please
    25  [let us know](https://github.com/golift/starr/issues/new)!
    26  
    27  This library is currently in use by:
    28  
    29  -   [Toolbarr](https://github.com/Notifiarr/toolbarr/) (all of it)
    30  -   [Unpackerr](https://github.com/Unpackerr/unpackerr/) (queue only)
    31  -   [Notifiarr](https://github.com/Notifiarr/notifiarr/) (a lot of it)
    32  -   [Checkrr](https://github.com/aetaric/checkrr/)
    33  
    34  # Usage
    35  
    36  Get it:
    37  ```shell
    38  go get golift.io/starr
    39  ```
    40  
    41  Use it:
    42  ```go
    43  import "golift.io/starr"
    44  ```
    45  
    46  ## Example
    47  
    48  ```go
    49  package main
    50  
    51  import (
    52  	"fmt"
    53  
    54  	"golift.io/starr"
    55  	"golift.io/starr/lidarr"
    56  )
    57  
    58  func main() {
    59  	// Get a starr.Config that can plug into any Starr app.
    60  	// starr.New(apiKey, appURL string, timeout time.Duration)
    61  	c := starr.New("abc1234ahsuyka123jh12", "http://localhost:8686", 0)
    62  	// Lets make a lidarr server with the default starr Config.
    63  	l := lidarr.New(c)
    64  
    65  	// In addition to GetSystemStatus, you have things like:
    66  	// * l.GetAlbum(albumID int)
    67  	// * l.GetQualityDefinition()
    68  	// * l.GetQualityProfiles()
    69  	// * l.GetRootFolders()
    70  	// * l.GetQueue(maxRecords int)
    71  	// * l.GetAlbum(albumUUID string)
    72  	// * l.GetArtist(artistUUID string)
    73  	status, err := l.GetSystemStatus()
    74  	if err != nil {
    75  		panic(err)
    76  	}
    77  
    78  	fmt.Println(status)
    79  }
    80  ```