示例#1
0
        public string GetImageURL(string size, ImageSizes.ImageType type)
        {
            var path = "";

            switch (type)
            {
            case ImageSizes.ImageType.Backdrop:
                path = backdrop_path;
                break;

            case ImageSizes.ImageType.Poster:
                path = poster_path;
                break;
            }
            return($"https://image.tmdb.org/t/p/{size}/{path}");
        }
示例#2
0
 public static string GetSize(ImageSizes.ImageType type) => BestImageSize[type.ToString("g")];
示例#3
0
 public static string GetImage(Movie movie, ImageSizes.ImageType type) => movie.GetImageURL(GetSize(type), type);