func GetCMS(c *http.Client, token string) (CMSInfo, error) {
	req, err := http.NewRequest(http.MethodGet, "https://beta-api.crunchyroll.com/index/v2", nil)

	if err != nil {
		return CMSInfo{}, err
	}

	req.Header.Add("Authorization", "Bearer "+token)
	req.Header.Add("User-Agent", common.UserAgent)
	req.Header.Add("Accept-Language", "en-US;q=1.0")

	resp, err := c.Do(req)

	if err != nil {
		return CMSInfo{}, err
	}

	defer resp.Body.Close()

	var cms CMSInfo
	body, _ := ioutil.ReadAll(resp.Body)
	json.Unmarshal([]byte(body), &cms)

	return cms, nil
}
// GetCMS gets crunchyroll CMS info
GetCMS gets crunchyroll CMS info
// GetCMS gets crunchyroll CMS info
func GetCMS(c *http.Client, token string) (CMSInfo, error) {
	req, err := http.NewRequest(http.MethodGet, "https://beta-api.crunchyroll.com/index/v2", nil)
	if err != nil {
		return CMSInfo{}, err
	}
	req.Header.Add("Authorization", "Bearer "+token)
	req.Header.Add("User-Agent", common.UserAgent)
	req.Header.Add("Accept-Language", "en-US;q=1.0")
	resp, err := c.Do(req)
	if err != nil {
		return CMSInfo{}, err
	}
	defer resp.Body.Close()
	var cms CMSInfo
	body, _ := ioutil.ReadAll(resp.Body)
	json.Unmarshal([]byte(body), &cms)
	return cms, nil
}
func GetCMS ( c * http . Client , token string ) ( CMSInfo , error ) { req , err := http . NewRequest ( http . MethodGet , " " , nil ) if err != nil { return CMSInfo { } , err } req . Header . Add ( " " , " " + token ) req . Header . Add ( " " , common . UserAgent ) req . Header . Add ( " " , " " ) resp , err := c . Do ( req ) if err != nil { return CMSInfo { } , err } defer resp . Body . Close ( ) var cms CMSInfo body , _ := ioutil . ReadAll ( resp . Body ) json . Unmarshal ( [ ] byte ( body ) , & cms ) return cms , nil }
GetCMS gets crunchyroll CMS info
GetCMS gets crunchyroll CMS info