void _EnsureFetchedImages() { var l = GetField <IList <object> >("images"); if (null == l) { l = new JsonArray(); var json = Tmdb.InvokeLang(string.Concat("/", string.Join("/", PathIdentity), "/images")); var array = new JsonArray(); object o; if (json.TryGetValue("logos", out o)) { var ll = o as IList <object>; if (null != ll) { for (int ic = ll.Count, i = 0; i < ic; ++i) { var d = ll[i] as IDictionary <string, object>; if (null != d) { d["image_type"] = "logo"; l.Add(d); } } } } Json.Add("images", l); } }
void _EnsureFetchedExternalIds() { var l = GetField <IList <object> >("external_ids"); if (null == l) { var json = Tmdb.InvokeLang(string.Concat("/", string.Join("/", PathIdentity), "/external_ids")); if (null != json) { Json.Add("external_ids", json); } } }
void _EnsureFetchedTranslations() { var l = GetField <IList <object> >("translations"); if (null == l) { var json = Tmdb.InvokeLang(string.Concat("/", string.Join("/", PathIdentity), "/translations")); object o; if (json.TryGetValue("translations", out o)) { l = o as IList <object>; } if (null != l) { Json.Add("translations", l); } } }
void _EnsureFetchedAlternativeNames() { var l = GetField <IList <object> >("alternative_names"); if (null == l) { var json = Tmdb.InvokeLang(string.Concat("/", string.Join("/", PathIdentity), "/alternative_names")); object o; if (json.TryGetValue("results", out o)) { l = o as IList <object>; } if (null != l) { Json.Add("alternative_names", l); } } }
protected void FetchJsonLang(string path = null, Func <object, object> fixupResponse = null, Func <object, object> fixupError = null) { var json = Tmdb.InvokeLang(path ?? string.Join("/", PathIdentity), null, null, fixupResponse, fixupError); JsonObject.CopyTo(json, Json); }