Add game id
This commit is contained in:
@ -4,6 +4,9 @@ namespace NostrStreamer.ApiModel;
|
|||||||
|
|
||||||
public class GameInfo
|
public class GameInfo
|
||||||
{
|
{
|
||||||
|
[JsonProperty("id")]
|
||||||
|
public string Id { get; init; } = null!;
|
||||||
|
|
||||||
[JsonProperty("name")]
|
[JsonProperty("name")]
|
||||||
public string Name { get; init; } = null!;
|
public string Name { get; init; } = null!;
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ public class GameInfoController : Controller
|
|||||||
|
|
||||||
var mapped = data?.Select(a => new GameInfo()
|
var mapped = data?.Select(a => new GameInfo()
|
||||||
{
|
{
|
||||||
|
Id = $"igdb:{a.Id}",
|
||||||
Name = a.Name,
|
Name = a.Name,
|
||||||
Cover = $"https://images.igdb.com/igdb/image/upload/t_cover_big_2x/{a.Cover?.ImageId}.jpg",
|
Cover = $"https://images.igdb.com/igdb/image/upload/t_cover_big_2x/{a.Cover?.ImageId}.jpg",
|
||||||
Genres = a.Genres.Select(b => b.Name).ToList()
|
Genres = a.Genres.Select(b => b.Name).ToList()
|
||||||
|
Reference in New Issue
Block a user