Documentation
¶
Overview ¶
Package srrdb allows to download & upload SRR files from srrdb.com and to access their search API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLoginCookieJar ¶
NewLoginCookieJar tries to login with the provided username and password and returns a cookie jar on success. You can store this jar, just take a look at the expiration date.
Types ¶
type SRRUploadResponse ¶
type SRRUploadResponse struct {
Files []SRRUploadedFile `json:"files"`
}
UploadResponse holds the results of a file upload.
func UploadSRRs ¶
func UploadSRRs(fps []string, jar *cookiejar.Jar) (SRRUploadResponse, error)
UploadSRRs will upload one or more SRR files to the srrdb. You can provide a login with a cookie jar, see NewLoginCookieJar().
type SRRUploadedFile ¶
type SRRUploadedFile struct { Dirname string `json:"name"` Color int `json:"color"` Message string `json:"message"` }
UploadedFile is the result of a file upload.
type SearchResponse ¶
type SearchResponse struct { Results []SearchResult `json:"results"` ResultCount int `json:"resultsCount"` Warnings []string `json:"warnings"` Query []string `json:"query"` }
SearchResponse holds the results of a search.
func Search ¶
func Search(query string) (SearchResponse, error)
Search will request the srrdb search API with the provided query and return their response. For a list of available keywords see http://www.srrdb.com/help#keywords
type SearchResult ¶
type SearchResult struct { Dirname string `json:"release"` DateResponse string `json:"date"` // f.e. 2014-06-16 17:35:26 HasNFOResponse string `json:"hasNFO"` HasSRSResponse string `json:"hasSRS"` }
SearchResult is the result of a search.
func (*SearchResult) HasNFO ¶
func (r *SearchResult) HasNFO() bool
HasNFO will return if the search-result has a NFO file.
func (*SearchResult) HasSRS ¶
func (r *SearchResult) HasSRS() bool
HasSRS will return if the search-result has a SRS file.