refactor: add cache tests and remove cache merge task (#14)

This commit is contained in:
l3uddz
2021-02-19 19:15:38 +00:00
committed by GitHub
parent 54cfd68810
commit e1945cf714
18 changed files with 537 additions and 61 deletions

View File

@@ -15,7 +15,7 @@ var (
func (c *Client) GetShow(tvdbId string) (*Show, error) {
// prepare request
reqUrl, err := util.URLWithQuery(util.JoinURL(c.apiURL, fmt.Sprintf("/search/tvdb/%s", tvdbId)),
reqUrl, err := util.URLWithQuery(util.JoinURL(c.apiURL, "search", "tvdb", tvdbId),
url.Values{
"type": []string{"show"},
"extended": []string{"full"}})
@@ -59,7 +59,7 @@ func (c *Client) GetShow(tvdbId string) (*Show, error) {
func (c *Client) GetMovie(imdbId string) (*Movie, error) {
// prepare request
reqUrl, err := util.URLWithQuery(util.JoinURL(c.apiURL, fmt.Sprintf("/search/imdb/%s", imdbId)),
reqUrl, err := util.URLWithQuery(util.JoinURL(c.apiURL, "search", "imdb", imdbId),
url.Values{
"type": []string{"movie"},
"extended": []string{"full"}})