public Movie MovieGetInfo(int movieCode, ResponseProfiles profile, TypeFilters[] types, IEnumerable <string> stripTags) { var nvc = new NameValueCollection(); nvc["partner"] = AlloCinePartnerKey; nvc["format"] = ResponseFormat.Json.ToString().ToLower(); nvc["code"] = movieCode.ToString().ToLower(); nvc["profile"] = profile.ToString().ToLower(); if (types != null) { nvc["filter"] = string.Join(",", types.ToList().Select(x => x.ToString()).ToArray()).ToLower(); } if (stripTags != null) { nvc["striptags"] = string.Join(",", stripTags.ToArray()).ToLower(); } var searchQuery = BuildSearchQueryWithSignature(ref nvc); var alObjectModel = DownloadData(string.Format(MovieGetInfoUrl, searchQuery), typeof(AllocineObjectModel)) as AllocineObjectModel; if (alObjectModel != null) { //If AlloCine returned an Error, we assigned the Error object to the Movie Error Object for easy check //from the class client side if (alObjectModel.Error != null && alObjectModel.Error.Value != null) { alObjectModel.Movie = new Movie { Error = alObjectModel.Error }; } return(alObjectModel.Movie); } return(null); }
public Movie MovieGetInfo(int movieCode, ResponseProfiles profile, TypeFilters[] types) { return(MovieGetInfo(movieCode, profile, types, new[] { "synopsis", "synopsisshort" })); }