From 12e75e26040f286b14c562f5e71d3c1cd7f3e2d0 Mon Sep 17 00:00:00 2001 From: ze0s <43699394+zze0s@users.noreply.github.com> Date: Wed, 3 Aug 2022 14:27:13 +0200 Subject: [PATCH] fix(indexers): ggn fetch data from api (#397) fix(indexers): fetch data from api --- pkg/ggn/ggn.go | 68 ++++++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/pkg/ggn/ggn.go b/pkg/ggn/ggn.go index 06f87e2..0b17579 100644 --- a/pkg/ggn/ggn.go +++ b/pkg/ggn/ggn.go @@ -58,39 +58,41 @@ type Group struct { CategoryName string `json:"categoryName"` MasterGroup int `json:"masterGroup"` Time string `json:"time"` - GameInfo struct { - Screenshots []string `json:"screenshots"` - Trailer string `json:"trailer"` - Rating string `json:"rating"` - MetaRating struct { - Score string `json:"score"` - Percent string `json:"percent"` - Link string `json:"link"` - } `json:"metaRating"` - IgnRating struct { - Score string `json:"score"` - Percent string `json:"percent"` - Link string `json:"link"` - } `json:"ignRating"` - GamespotRating struct { - Score string `json:"score"` - Percent string `json:"percent"` - Link string `json:"link"` - } `json:"gamespotRating"` - Weblinks struct { - GamesWebsite string `json:"GamesWebsite"` - Wikipedia string `json:"Wikipedia"` - Giantbomb string `json:"Giantbomb"` - GameFAQs string `json:"GameFAQs"` - PCGamingWiki string `json:"PCGamingWiki"` - Steam string `json:"Steam"` - Amazon string `json:"Amazon"` - GOG string `json:"GOG"` - HowLongToBeat string `json:"HowLongToBeat"` - } `json:"weblinks"` - } `json:"gameInfo"` - Tags []string `json:"tags"` - Platform string `json:"platform"` + Tags []string `json:"tags"` + Platform string `json:"platform"` +} + +type GameInfo struct { + Screenshots []string `json:"screenshots"` + Trailer string `json:"trailer"` + Rating string `json:"rating"` + MetaRating struct { + Score string `json:"score"` + Percent string `json:"percent"` + Link string `json:"link"` + } `json:"metaRating"` + IgnRating struct { + Score string `json:"score"` + Percent string `json:"percent"` + Link string `json:"link"` + } `json:"ignRating"` + GamespotRating struct { + Score string `json:"score"` + Percent string `json:"percent"` + Link string `json:"link"` + } `json:"gamespotRating"` + Weblinks struct { + GamesWebsite string `json:"GamesWebsite"` + Wikipedia string `json:"Wikipedia"` + Giantbomb string `json:"Giantbomb"` + GameFAQs string `json:"GameFAQs"` + PCGamingWiki string `json:"PCGamingWiki"` + Steam string `json:"Steam"` + Amazon string `json:"Amazon"` + GOG string `json:"GOG"` + HowLongToBeat string `json:"HowLongToBeat"` + } `json:"weblinks"` + //`json:"gameInfo"` } type Torrent struct {