package resource import "encoding/json" // SrrdbSearchResponse is the payload of GET https://api.srrdb.com/v1/search/{path}. // Query stays raw because the API returns a heterogeneous array there: category // ids as numbers, search terms as strings. type SrrdbSearchResponse struct { Results []SrrdbResult `json:"results"` ResultsCount int `json:"resultsCount"` Warnings []string `json:"warnings"` Query json.RawMessage `json:"query"` } // SrrdbResult is a single release as reported by the search endpoint. // HasNFO, HasSRS and IsForeign arrive as the literal strings "yes" and "no"; // ImdbID is null for music releases. type SrrdbResult struct { Release string `json:"release"` Date string `json:"date"` HasNFO string `json:"hasNFO"` HasSRS string `json:"hasSRS"` IsForeign string `json:"isForeign"` ImdbID *string `json:"imdbId"` Size int64 `json:"size"` }