Changelog 0.3.0

This commit is contained in:
Mukhtar Akere
2024-11-30 15:46:58 +01:00
parent df2aa4e361
commit a51364d150
53 changed files with 2019 additions and 679 deletions

29
pkg/arr/content.go Normal file
View File

@@ -0,0 +1,29 @@
package arr
import (
"encoding/json"
"fmt"
"net/http"
)
type ContentRequest struct {
ID string `json:"id"`
Title string `json:"name"`
Arr string `json:"arr"`
}
func (a *Arr) GetContents() *ContentRequest {
resp, err := a.Request(http.MethodGet, "api/v3/series", nil)
if err != nil {
return nil
}
defer resp.Body.Close()
var data *ContentRequest
if err = json.NewDecoder(resp.Body).Decode(&data); err != nil {
fmt.Printf("Error: %v\n", err)
return nil
}
fmt.Printf("Data: %v\n", data)
//data.Arr = a.Name
return data
}