response structs

This commit is contained in:
2026-01-19 23:01:16 +01:00
parent ee6dfca55f
commit a89c320106
3 changed files with 38 additions and 28 deletions

View File

@@ -5,6 +5,14 @@ import (
"net/http"
)
type RedmineResponse struct {
Issues []struct {
ID int
UpdatedOn string
Subject string
}
}
type RedmineFetcher struct {
Config Config
Cache *Cache
@@ -15,13 +23,8 @@ func (f RedmineFetcher) Fetch() []string {
req, _ := http.NewRequest("GET", redmineURL, nil)
req.Header.Set("X-Redmine-API-Key", f.Config.RedmineKey)
var r struct {
Issues []struct {
ID int
UpdatedOn string
Subject string
}
}
var r RedmineResponse
if err := getJSON(req, &r); err != nil {
return []string{}
}