public static UnsplashImage CreateHighlightImage(DateTime dateTime, bool inHighlightList) { var date = dateTime.ToString("yyyyMMdd"); var year = dateTime.ToString("yyyy"); var thumbUrl = $"{Request.GetTodayThumbWallpaper}/{date}.jpg"; var largeUrl = $"{Request.GetTodayWallpaper}/{date}.jpg"; var tileUrl = $"{Request.GetTodayTileWallpaper}/{year}/{date}.jpg"; var image = new UnsplashImage() { Likes = 100, Urls = new UnsplashUrl() { Thumb = thumbUrl, Regular = thumbUrl, Small = thumbUrl, Full = largeUrl, Raw = largeUrl, Tile = tileUrl }, ColorValue = DEFAULT_COLOR, ID = date, CreateTimeString = dateTime.ToString("yyyy-MM-dd"), IsUnsplash = false, IsInHighlightList = inHighlightList, Owner = new UnsplashUser() { Name = "JuniperPhoton", Id = "JuniperPhoton", } }; return(image); }
public static UnsplashImage CreateTodayImage() { var date = DateTime.Now.ToString("yyyyMMdd"); var thumbUrl = $"{Request.GetTodayThumbWallpaper}/{date}.jpg"; var largeUrl = $"{Request.GetTodayWallpaper}/{date}.jpg"; var image = new UnsplashImage() { Likes = 100, Urls = new UnsplashUrl() { Thumb = thumbUrl, Regular = thumbUrl, Small = thumbUrl, Full = largeUrl, Raw = largeUrl, }, ColorValue = "#ffffff", ID = date, CreateTimeString = DateTime.Now.ToString("yyyy-MM-dd 00:00:00"), IsUnsplash = false, Owner = new UnsplashUser() { Name = "JuniperPhoton", Id = "JuniperPhoton", } }; return(image); }