Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed dependancies added error handling in the API

fixed dependancies added error handling in the API
  • Loading branch information...
commit 5ecf4a09f7e3ef6dfb031c8ef2c6802ab0305d52 1 parent f25c238
@msavazzi msavazzi authored
View
2  Addons/scraper.EmberCore.TMDB/Langs/scraper.EmberCore.TMDBEnglish_(en_US).xml
@@ -103,7 +103,7 @@
<string id="101">Get Posters</string>
<string id="102">Get Fanart</string>
<string id="103">These settings are specific to this module.{0}Please refer to the global settings for more options.</string>
- <string id="104">Ember Native Movie Scrapers</string>
+ <string id="104">Ember TMDB Movie Scrapers</string>
<string id="105"/>
<string id="106">IMDB</string>
<string id="107">OFDB (German)</string>
View
50 Addons/scraper.EmberCore.TMDB/Scraper/clsScrapeFANARTTV.vb
@@ -17,6 +17,20 @@
' # You should have received a copy of the GNU General Public License #
' # along with Ember Media Manager. If not, see <http://www.gnu.org/licenses/>. #
' ################################################################################
+' # HD Movie Logos -> logo.png (choose this first)
+' # ClearLOGOs -> logo.png (use this as a backup if no HD Logo in the lanaguage specified)
+' # ClearART -> clearart.png (use this as a backup if no HD ClearArt, in the language specified)
+' # HDClearART -> clearart.png (choose this first)
+' # cdART -> disc.png
+' # Movie Backgrounds -> Fanart (this is the only fanart.tv artwork that might overlap with 'typical' artwork scraping from IMDB/TMDB)
+' # Movie Banner -> Banner (not poster - Frodo supports both now, <moviename>-poster.jpg/png and <moviename>-banner.jpg/png or poster.jpg/png and banner.jpg/png)
+' # Movie Thumbs -> landscape.png
+' # Special note - the Logos and ClearArts are language-specific and should be tagged with the appropriate language. Will want to have a setting allowing users to specify a language so as not to get a bunch of foreign-language artwork.
+' # 1) Logo.png - to be added at a later stage, today is not possible to save
+' # 2) Clearart.png - to be added at a later stage, today is not possible to save
+' # 3) Disc.png - to be added at a later stage, today is not possible to save
+' # 4) Landscape.png - to be added at a later stage, today is not possible to save
+' # language is in image properties
Imports System.IO
Imports System.IO.Compression
@@ -84,18 +98,15 @@ Namespace FANARTTVs
Dim alPoster As New List(Of MediaContainers.Image)
If _APIInvalid Then
- Return alPoster
+ Return Nothing
End If
Try
+ Dim Result As FanartTV.V1.FanartTVMovie = _FanartTV.GetMovieInfo(New FanartTV.V1.FanartTVRequest(imdbID, "JSON", "all", 1, 2))
If bwFANARTTV.CancellationPending Then Return Nothing
- For Each mPoster As Match In mcPoster
- If bwFANARTTV.CancellationPending Then Return Nothing
- PosterURL = Strings.Replace(String.Format("{0}/{1}", sURL.Substring(0, sURL.LastIndexOf("/")), mPoster.Value.ToString()).Replace("thumbs", "posters"), "imp_", String.Empty)
-
- alPoster.Add(New MediaContainers.Image With {.Description = "poster", .URL = PosterURL})
-
- PosterURL = PosterURL.Insert(PosterURL.LastIndexOf("."), "_xlg")
- alPoster.Add(New MediaContainers.Image With {.Description = "original", .URL = PosterURL})
+ If IsNothing(Result) Then Return alPoster
+ If IsNothing(Result.movieinfo.moviebackground) Then Return alPoster
+ For Each image In Result.movieinfo.moviebackground
+ alPoster.Add(New MediaContainers.Image With {.Description = "original", .URL = image.url})
Next
Catch ex As Exception
Master.eLog.WriteToErrorLog(ex.Message, ex.StackTrace, "Error")
@@ -107,7 +118,7 @@ Namespace FANARTTVs
Private Sub bwFANARTTVA_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles bwFANARTTV.DoWork
Dim Args As Arguments = DirectCast(e.Argument, Arguments)
Try
- e.Result = GetIMPAPosters(Args.Parameter)
+ e.Result = GetFANARTTVImages(Args.Parameter)
Catch ex As Exception
Master.eLog.WriteToErrorLog(ex.Message, ex.StackTrace, "Error")
e.Result = Nothing
@@ -126,25 +137,6 @@ Namespace FANARTTVs
End If
End Sub
- Private Function GetLink(ByVal IMDBID As String) As String
- Try
-
- Dim sHTTP As New HTTP
- Dim HTML As String = sHTTP.DownloadData(String.Concat("http://www.imdb.com/title/tt", IMDBID, "/posters"))
- sHTTP = Nothing
-
- Dim mcIMPA As MatchCollection = Regex.Matches(HTML, "http://([^""]*)impawards.com/([^""]*)")
- If mcIMPA.Count > 0 Then
- 'just use the first one if more are found
- Return mcIMPA(0).Value.ToString
- Else
- Return String.Empty
- End If
- Catch ex As Exception
- Master.eLog.WriteToErrorLog(ex.Message, ex.StackTrace, "Error")
- Return String.Empty
- End Try
- End Function
#End Region 'Methods
View
18 Addons/scraper.EmberCore.TMDB/Scraper/clsScrapeImages.vb
@@ -162,7 +162,7 @@ Public Class ScrapeImages
End If
End If
Else
- If AdvancedSettings.GetBooleanSetting("UseTMDB", True) Then
+ If AdvancedSettings.GetBooleanSetting("tUseTMDB", True) Then
'download all TMBD images
tmpListTMDB = TMDB.GetTMDBImages(IMDBID, "poster")
@@ -205,7 +205,7 @@ Public Class ScrapeImages
End If
End If
- If AdvancedSettings.GetBooleanSetting("UseIMPA", False) Then
+ If AdvancedSettings.GetBooleanSetting("tUseIMPA", False) Then
If IsNothing(Image.Image) Then
'no poster of the proper size from TMDB found... try IMPA
@@ -253,7 +253,7 @@ Public Class ScrapeImages
End If
End If
- If AdvancedSettings.GetBooleanSetting("UseMPDB", False) Then
+ If AdvancedSettings.GetBooleanSetting("tUseMPDB", False) Then
If IsNothing(Image.Image) Then
'no poster of the proper size from TMDB or IMPA found... try MPDB
@@ -335,7 +335,7 @@ Public Class ScrapeImages
Image.Clear()
- If AdvancedSettings.GetBooleanSetting("UseIMPA", False) Then
+ If AdvancedSettings.GetBooleanSetting("tUseIMPA", False) Then
If tmpListIMPA.Count > 0 Then
If Not IsNothing(tmpIMPAX) Then
Image.Image = New Bitmap(tmpIMPAX)
@@ -362,7 +362,7 @@ Public Class ScrapeImages
Image.Clear()
- If AdvancedSettings.GetBooleanSetting("UseMPDB", False) Then
+ If AdvancedSettings.GetBooleanSetting("tUseMPDB", False) Then
If tmpListMPDB.Count > 0 Then
If Not IsNothing(tmpMPDBX) Then
Image.Image = New Bitmap(tmpMPDBX)
@@ -395,7 +395,7 @@ Public Class ScrapeImages
Else 'fanart
- If AdvancedSettings.GetBooleanSetting("UseTMDB", True) Then
+ If AdvancedSettings.GetBooleanSetting("tUseTMDB", True) Then
Dim ETHashes As New List(Of String)
If Master.eSettings.AutoET AndAlso doETs Then
@@ -679,7 +679,7 @@ foundIT:
Public Sub GetPreferredFAasET(ByVal IMDBID As String, ByVal sPath As String)
Dim _Image As Image
- If AdvancedSettings.GetBooleanSetting("UseTMDB", True) Then
+ If AdvancedSettings.GetBooleanSetting("tUseTMDB", True) Then
Dim tmpListTMDB As New List(Of MediaContainers.Image)
Dim ETHashes As New List(Of String)
@@ -834,7 +834,7 @@ foundIT:
Case Enums.ImageType.Fanart
If (isChange OrElse (String.IsNullOrEmpty(mMovie.FanartPath) OrElse Master.eSettings.OverwriteFanart)) AndAlso _
(Master.eSettings.MovieNameDotFanartJPG OrElse Master.eSettings.MovieNameFanartJPG OrElse Master.eSettings.FanartJPG) AndAlso _
- AdvancedSettings.GetBooleanSetting("UseTMDB", True) Then
+ AdvancedSettings.GetBooleanSetting("tUseTMDB", True) Then
Return True
Else
Return False
@@ -843,7 +843,7 @@ foundIT:
If (isChange OrElse (String.IsNullOrEmpty(mMovie.PosterPath) OrElse Master.eSettings.OverwritePoster)) AndAlso _
(Master.eSettings.MovieTBN OrElse Master.eSettings.MovieNameTBN OrElse Master.eSettings.MovieJPG OrElse _
Master.eSettings.MovieNameJPG OrElse Master.eSettings.PosterTBN OrElse Master.eSettings.PosterJPG OrElse Master.eSettings.FolderJPG) AndAlso _
- (AdvancedSettings.GetBooleanSetting("UseIMPA", False) OrElse AdvancedSettings.GetBooleanSetting("UseMPDB", False) OrElse AdvancedSettings.GetBooleanSetting("UseTMDB", True)) Then
+ (AdvancedSettings.GetBooleanSetting("tUseIMPA", False) OrElse AdvancedSettings.GetBooleanSetting("UseMPDB", False) OrElse AdvancedSettings.GetBooleanSetting("UseTMDB", True)) Then
Return True
Else
Return False
View
14 Addons/scraper.EmberCore.TMDB/Scraper/dlgImgSelect.vb
@@ -55,7 +55,7 @@ Public Class dlgImgSelect
Private IMDB As New IMDBimg.Scraper
Private IMDBPosters As New List(Of MediaContainers.Image)
- Private FANARTTV As FANARTTVs.Scraper
+ Private FANARTTVs As FANARTTVs.Scraper
Private FANARTTVPosters As New List(Of MediaContainers.Image)
Private CachePath As String = String.Empty
@@ -113,7 +113,7 @@ Public Class dlgImgSelect
_TMDBApiE = tTMDBApiE
_TMDBConfE = tTMDBConfE
TMDB = New TMDB.Scraper(_TMDBConf, _TMDBConfE, _TMDBApi, _TMDBApiE, _MySettings)
- FANARTTV = New FANARTTVs.Scraper(_MySettings)
+ FANARTTVs = New FANARTTVs.Scraper(_MySettings)
End Sub
Public Sub PreLoad(ByVal mMovie As Structures.DBMovie, ByVal _DLType As Enums.ImageType, Optional ByVal _isEdit As Boolean = False)
@@ -614,7 +614,7 @@ Public Class dlgImgSelect
MPDB.Cancel()
TMDB.Cancel()
IMDB.Cancel()
- FANARTTV.Cancel()
+ FANARTTVs.Cancel()
If bwIMPADownload.IsBusy Then bwIMPADownload.CancelAsync()
If bwMPDBDownload.IsBusy Then bwMPDBDownload.CancelAsync()
@@ -658,7 +658,7 @@ Public Class dlgImgSelect
MPDB = Nothing
TMDB = Nothing
IMDB = Nothing
- FANARTTV = Nothing
+ FANARTTVs = Nothing
IMPAPosters = Nothing
MPDBPosters = Nothing
@@ -859,7 +859,7 @@ Public Class dlgImgSelect
Me._fanarttvDone = False
- Me.FANARTTV.GetImagesAsync(tMovie.Movie.ID)
+ Me.FANARTTVs.GetImagesAsync(tMovie.Movie.ID)
Else
Me.lblDL2.Text = Master.eLang.GetString(121, "Fanart.tv is not enabled")
End If
@@ -1350,8 +1350,8 @@ Public Class dlgImgSelect
AddHandler MPDB.ProgressUpdated, AddressOf MPDBProgressUpdated
AddHandler IMDB.PostersDownloaded, AddressOf IMDBPostersDownloaded
AddHandler IMDB.ProgressUpdated, AddressOf IMDBProgressUpdated
- AddHandler FANARTTV.PostersDownloaded, AddressOf FANARTTVPostersDownloaded
- AddHandler FANARTTV.ProgressUpdated, AddressOf FANARTTVProgressUpdated
+ AddHandler FANARTTVs.PostersDownloaded, AddressOf FANARTTVPostersDownloaded
+ AddHandler FANARTTVs.ProgressUpdated, AddressOf FANARTTVProgressUpdated
AddHandler IMPADone, AddressOf IMPADoneDownloading
AddHandler TMDBDone, AddressOf TMDBDoneDownloading
AddHandler MPDBDone, AddressOf MPDBDoneDownloading
View
2  Addons/scraper.EmberCore.TMDB/scraperMovieTMDBModule.vb
@@ -274,7 +274,7 @@ Public Class EmberTMDBScraperModule
_setup.txtFANARTTVApiKey.Text = _MySettings.FANARTTVApiKey
SPanel.Name = String.Concat(Me._Name, "Scraper")
- SPanel.Text = Master.eLang.GetString(858, "Ember TMDB Movie Scrapers ddddd")
+ SPanel.Text = Master.eLang.GetString(104, "Ember TMDB Movie Scrapers")
SPanel.Prefix = "TMDBMovieInfo_"
SPanel.Order = 110
SPanel.Parent = "pnlMovieData"
View
6 Ember Media Manager.sln
@@ -245,31 +245,37 @@ Global
{EFC11645-FAB4-4C30-A498-29F5ECDF77E8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{EFC11645-FAB4-4C30-A498-29F5ECDF77E8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{EFC11645-FAB4-4C30-A498-29F5ECDF77E8}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {EFC11645-FAB4-4C30-A498-29F5ECDF77E8}.Debug|x86.Build.0 = Debug|Any CPU
{EFC11645-FAB4-4C30-A498-29F5ECDF77E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EFC11645-FAB4-4C30-A498-29F5ECDF77E8}.Release|Any CPU.Build.0 = Release|Any CPU
{EFC11645-FAB4-4C30-A498-29F5ECDF77E8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{EFC11645-FAB4-4C30-A498-29F5ECDF77E8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{EFC11645-FAB4-4C30-A498-29F5ECDF77E8}.Release|x86.ActiveCfg = Release|Any CPU
+ {EFC11645-FAB4-4C30-A498-29F5ECDF77E8}.Release|x86.Build.0 = Release|Any CPU
{70F651C6-6BB4-4E4D-AD6C-25C36CA1E9E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{70F651C6-6BB4-4E4D-AD6C-25C36CA1E9E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{70F651C6-6BB4-4E4D-AD6C-25C36CA1E9E6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{70F651C6-6BB4-4E4D-AD6C-25C36CA1E9E6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{70F651C6-6BB4-4E4D-AD6C-25C36CA1E9E6}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {70F651C6-6BB4-4E4D-AD6C-25C36CA1E9E6}.Debug|x86.Build.0 = Debug|Any CPU
{70F651C6-6BB4-4E4D-AD6C-25C36CA1E9E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{70F651C6-6BB4-4E4D-AD6C-25C36CA1E9E6}.Release|Any CPU.Build.0 = Release|Any CPU
{70F651C6-6BB4-4E4D-AD6C-25C36CA1E9E6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{70F651C6-6BB4-4E4D-AD6C-25C36CA1E9E6}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{70F651C6-6BB4-4E4D-AD6C-25C36CA1E9E6}.Release|x86.ActiveCfg = Release|Any CPU
+ {70F651C6-6BB4-4E4D-AD6C-25C36CA1E9E6}.Release|x86.Build.0 = Release|Any CPU
{8DAFAF56-AD78-4B47-866F-E8179511AF5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8DAFAF56-AD78-4B47-866F-E8179511AF5B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8DAFAF56-AD78-4B47-866F-E8179511AF5B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{8DAFAF56-AD78-4B47-866F-E8179511AF5B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{8DAFAF56-AD78-4B47-866F-E8179511AF5B}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {8DAFAF56-AD78-4B47-866F-E8179511AF5B}.Debug|x86.Build.0 = Debug|Any CPU
{8DAFAF56-AD78-4B47-866F-E8179511AF5B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8DAFAF56-AD78-4B47-866F-E8179511AF5B}.Release|Any CPU.Build.0 = Release|Any CPU
{8DAFAF56-AD78-4B47-866F-E8179511AF5B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{8DAFAF56-AD78-4B47-866F-E8179511AF5B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{8DAFAF56-AD78-4B47-866F-E8179511AF5B}.Release|x86.ActiveCfg = Release|Any CPU
+ {8DAFAF56-AD78-4B47-866F-E8179511AF5B}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
View
4 Ember Media Manager/Ember Media Manager.vbproj
@@ -4815,6 +4815,10 @@
<Project>{208AA35E-C6AE-4D2D-A9DD-B6EFD19A4279}</Project>
<Name>EmberAPI</Name>
</ProjectReference>
+ <ProjectReference Include="..\FanartTVAPI\FanartTVAPI.csproj">
+ <Project>{70F651C6-6BB4-4E4D-AD6C-25C36CA1E9E6}</Project>
+ <Name>FanartTVAPI</Name>
+ </ProjectReference>
<ProjectReference Include="..\WatTmdb\WatTmdb.csproj">
<Project>{EFC11645-FAB4-4C30-A498-29F5ECDF77E8}</Project>
<Name>WatTmdb</Name>
View
31 FanartTVAPI/FanartTV/FanartTV.Async.cs
@@ -44,17 +44,26 @@ private void ProcessAsyncRequest<T>(RestRequest request, Action<FanartTVAsyncRes
ResponseContent = resp.Content;
ResponseHeaders = resp.Headers.ToDictionary(k => k.Name, v => v.Value);
- if (resp.ResponseStatus != ResponseStatus.Completed)
- {
- if (resp.Content.Contains("Please specify a valid API key"))
- result.Error = resp.Content ;
- else if (resp.ErrorException != null)
- throw resp.ErrorException;
- else
- result.Error = resp.Content ;
- }
-
- Error = result.Error;
+ switch (resp.ResponseStatus)
+ {
+ case ResponseStatus.Completed:
+ switch (resp.StatusCode)
+ {
+ case HttpStatusCode.OK:
+ if (resp.Content == "Please specify a valid API key")
+ result.Error = resp.Content;
+ break;
+ default:
+ result.Error = resp.Content;
+ break;
+ }
+ break;
+ default:
+ result.Error = "HTTP Error";
+ break;
+ }
+
+ Error = result.Error;
callback(result);
});
View
35 FanartTVAPI/FanartTV/FanartTV.Sync.cs
@@ -31,24 +31,27 @@ private T ProcessRequest<T>(RestRequest request)
ResponseContent = resp.Content;
ResponseHeaders = resp.Headers.ToDictionary(k => k.Name, v => v.Value);
- if (resp.ResponseStatus == ResponseStatus.Completed)
+ switch (resp.ResponseStatus)
{
- if (resp.Content.Contains("Please specify a valid API key"))
- Error = resp.Content;
-
- return resp.Data;
- }
- else
- {
- if (resp.Content.Contains("Please specify a valid API key"))
- Error = resp.Content;
- else if (resp.ErrorException != null)
- throw resp.ErrorException;
- else
- Error = resp.ErrorMessage;
+ case ResponseStatus.Completed:
+ switch (resp.StatusCode)
+ {
+ case HttpStatusCode.OK:
+ if (resp.Content == "Please specify a valid API key")
+ Error = resp.Content;
+ return resp.Data;
+ break;
+ default:
+ Error = resp.Content;
+ return default(T);
+ break;
+ }
+ break;
+ default:
+ Error = "HTTP Error";
+ return default(T);
+ break;
}
-
- return default(T);
}
#endregion
View
2  FanartTVAPI/Properties/AssemblyInfo.cs
@@ -8,7 +8,7 @@
[assembly: AssemblyTitle("FanartTVAPI")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany("m.savazzi")]
[assembly: AssemblyProduct("FanartTVAPI")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyTrademark("")]
View
2  RottenTomatoesAPI/Properties/AssemblyInfo.cs
@@ -8,7 +8,7 @@
[assembly: AssemblyTitle("RottenTomatoesAPI")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany("m.savazzi")]
[assembly: AssemblyProduct("RottenTomatoesAPI")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyTrademark("")]
View
31 RottenTomatoesAPI/RottenTomatoes/RottenTomatoes.Async.cs
@@ -44,17 +44,26 @@ private void ProcessAsyncRequest<T>(RestRequest request, Action<RottenTomatoesAs
ResponseContent = resp.Content;
ResponseHeaders = resp.Headers.ToDictionary(k => k.Name, v => v.Value);
- if (resp.ResponseStatus != ResponseStatus.Completed)
- {
- if (resp.Content.Contains("status_message"))
- result.Error = resp.Content ;
- else if (resp.ErrorException != null)
- throw resp.ErrorException;
- else
- result.Error = resp.Content ;
- }
-
- Error = result.Error;
+ switch (resp.ResponseStatus)
+ {
+ case ResponseStatus.Completed:
+ switch (resp.StatusCode)
+ {
+ case HttpStatusCode.OK:
+ if (resp.Content == "Please specify a valid API key")
+ result.Error = resp.Content;
+ break;
+ default:
+ result.Error = resp.Content;
+ break;
+ }
+ break;
+ default:
+ result.Error = "HTTP Error";
+ break;
+ }
+
+ Error = result.Error;
callback(result);
});
View
34 RottenTomatoesAPI/RottenTomatoes/RottenTomatoes.Sync.cs
@@ -30,23 +30,27 @@ private T ProcessRequest<T>(RestRequest request)
ResponseContent = resp.Content;
ResponseHeaders = resp.Headers.ToDictionary(k => k.Name, v => v.Value);
- if (resp.ResponseStatus == ResponseStatus.Completed)
+ switch (resp.ResponseStatus)
{
- if (resp.Content.Contains("status_message"))
- Error = resp.Content;
-
- return resp.Data;
- }
- else
- {
- if (resp.Content.Contains("status_message"))
- Error = resp.Content;
- else if (resp.ErrorException != null)
- throw resp.ErrorException;
- else
- Error = resp.ErrorMessage;
+ case ResponseStatus.Completed:
+ switch (resp.StatusCode)
+ {
+ case HttpStatusCode.OK:
+ if (resp.Content == "Please specify a valid API key")
+ Error = resp.Content;
+ return resp.Data;
+ break;
+ default:
+ Error = resp.Content;
+ return default(T);
+ break;
+ }
+ break;
+ default:
+ Error = "HTTP Error";
+ return default(T);
+ break;
}
-
return default(T);
}
View
1  RottenTomatoesAPI/RottenTomatoesAPI.csproj
@@ -31,6 +31,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
+ <PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="RestSharp">
Please sign in to comment.
Something went wrong with that request. Please try again.