/// <summary> /// Gets all series this user has already ratet /// </summary> /// <exception cref="TvdbUserNotFoundException">Thrown when no user is set</exception> /// <returns></returns> internal Dictionary <int, TvdbRating> DownloadAllSeriesRatings(String _userId) { String xml = ""; String link = ""; try { link = TvdbLinks.CreateAllSeriesRatingsLink(m_apiKey, _userId); xml = m_webClient.DownloadString(link); return(m_xmlHandler.ExtractRatings(xml, TvdbRating.ItemType.Series)); } catch (XmlException ex) { Log.Error("Error parsing the xml file " + link + "\n\n" + xml, ex); throw new TvdbInvalidXmlException("Error parsing the xml file " + link + "\n\n" + xml); } catch (WebException ex) { Log.Warn("Request not successfull", ex); if (ex.Message.Equals("The remote server returned an error: (404) Not Found.")) { throw new TvdbInvalidApiKeyException("Couldn't connect to Thetvdb.com to retrieve rating of all series " + ", it seems like you use an invalid api key"); } else { throw new TvdbNotAvailableException("Couldn't connect to Thetvdb.com to retrieve rating of all series " + ", check your internet connection and the status of http://thetvdb.com"); } } }