mirror of
https://github.com/bestnite/go-igdb.git
synced 2025-04-19 23:35:54 +08:00
u
This commit is contained in:
parent
a0e24ca14b
commit
76a3e977ba
@ -61,3 +61,12 @@ func (g *igdb) GetAgeRatingCategoriesByOrganizationIDs(ids []uint64) ([]*pb.AgeR
|
|||||||
|
|
||||||
return g.GetAgeRatingCategories(idStr)
|
return g.GetAgeRatingCategories(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetAgeRatingCategoriesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
ageRatingCategories, err := g.GetAgeRatingCategories(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(ageRatingCategories[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetAgeRatingContentDescriptionsByIDs(ids []uint64) ([]*pb.AgeRati
|
|||||||
|
|
||||||
return g.GetAgeRatingContentDescriptions(idStr)
|
return g.GetAgeRatingContentDescriptions(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetAgeRatingContentDescriptionsLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
ageRatingContentDescriptions, err := g.GetAgeRatingContentDescriptions(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(ageRatingContentDescriptions[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -61,3 +61,12 @@ func (g *igdb) GetAgeRatingContentDescriptionsV2ByOrganizationIDs(ids []uint64)
|
|||||||
|
|
||||||
return g.GetAgeRatingContentDescriptionsV2(idStr)
|
return g.GetAgeRatingContentDescriptionsV2(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetAgeRatingContentDescriptionsV2Length() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
ageRatingContentDescriptions, err := g.GetAgeRatingContentDescriptionsV2(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(ageRatingContentDescriptions[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetAgeRatingOrganizationsByIDs(ids []uint64) ([]*pb.AgeRatingOrga
|
|||||||
|
|
||||||
return g.GetAgeRatingOrganizations(idStr)
|
return g.GetAgeRatingOrganizations(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetAgeRatingOrganizationsLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
ageRatingOrganizations, err := g.GetAgeRatingOrganizations(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(ageRatingOrganizations[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -77,3 +77,12 @@ func (g *igdb) GetAgeRatingsByAgeRatingCategoryIDs(ids []uint64) ([]*pb.AgeRatin
|
|||||||
|
|
||||||
return g.GetAgeRatings(idStr)
|
return g.GetAgeRatings(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetAgeRatingsLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
ageRatings, err := g.GetAgeRatings(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(ageRatings[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -61,3 +61,12 @@ func (g *igdb) GetAlternativeNamesByGameIDs(ids []uint64) ([]*pb.AlternativeName
|
|||||||
|
|
||||||
return g.GetAlternativeNames(idStr)
|
return g.GetAlternativeNames(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetAlternativeNamesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
alternativeNames, err := g.GetAlternativeNames(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(alternativeNames[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -62,3 +62,12 @@ func (g *igdb) GetArtworksByGameIDs(ids []uint64) ([]*pb.Artwork, error) {
|
|||||||
|
|
||||||
return g.GetArtworks(idStr)
|
return g.GetArtworks(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetArtworksLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
artworks, err := g.GetArtworks(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(artworks[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetCharacterGendersByIDs(ids []uint64) ([]*pb.CharacterGender, er
|
|||||||
|
|
||||||
return g.GetCharacterGenders(idStr)
|
return g.GetCharacterGenders(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetCharacterGendersLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
characterGenders, err := g.GetCharacterGenders(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(characterGenders[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetCharacterMugShotsByIDs(ids []uint64) ([]*pb.CharacterMugShot,
|
|||||||
|
|
||||||
return g.GetCharacterMugShots(idStr)
|
return g.GetCharacterMugShots(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetCharacterMugShotsLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
characterMugShots, err := g.GetCharacterMugShots(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(characterMugShots[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetCharacterSpeciesByIDs(ids []uint64) ([]*pb.CharacterSpecie, er
|
|||||||
|
|
||||||
return g.GetCharacterSpecies(idStr)
|
return g.GetCharacterSpecies(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetCharacterSpeciesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
characterSpecies, err := g.GetCharacterSpecies(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(characterSpecies[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -94,3 +94,12 @@ func (g *igdb) GetCharactersByMugShotIDs(ids []uint64) ([]*pb.Character, error)
|
|||||||
|
|
||||||
return g.GetCharacters(idStr)
|
return g.GetCharacters(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetCharactersLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
characters, err := g.GetCharacters(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(characters[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -61,3 +61,12 @@ func (g *igdb) GetCollectionMembershipTypesByAllowedCollectionTypeIDs(ids []uint
|
|||||||
|
|
||||||
return g.GetCollectionMembershipTypes(idStr)
|
return g.GetCollectionMembershipTypes(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetCollectionMembershipTypesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
collectionMembershipTypes, err := g.GetCollectionMembershipTypes(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(collectionMembershipTypes[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -82,3 +82,12 @@ func (g *igdb) GetCollectionMembershipsByCollectionMembershipTypeIDs(ids []uint6
|
|||||||
|
|
||||||
return g.GetCollectionMemberships(idStr)
|
return g.GetCollectionMemberships(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetCollectionMembershipsLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
collectionMemberships, err := g.GetCollectionMemberships(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(collectionMemberships[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -77,3 +77,12 @@ func (g *igdb) GetCollectionRelationTypesByAllowedParentTypeIDs(ids []uint64) ([
|
|||||||
|
|
||||||
return g.GetCollectionRelationTypes(idStr)
|
return g.GetCollectionRelationTypes(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetCollectionRelationTypesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
collectionRelationTypes, err := g.GetCollectionRelationTypes(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(collectionRelationTypes[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -93,3 +93,12 @@ func (g *igdb) GetCollectionRelationsByCollectionRelationTypeIDs(ids []uint64) (
|
|||||||
|
|
||||||
return g.GetCollectionRelations(idStr)
|
return g.GetCollectionRelations(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetCollectionRelationsLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
collectionRelations, err := g.GetCollectionRelations(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(collectionRelations[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetCollectionTypesByIDs(ids []uint64) ([]*pb.CollectionType, erro
|
|||||||
|
|
||||||
return g.GetCollectionTypes(idStr)
|
return g.GetCollectionTypes(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetCollectionTypesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
collectionTypes, err := g.GetCollectionTypes(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(collectionTypes[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -62,3 +62,12 @@ func (g *igdb) GetCollectionsByCollectionTypeIDs(ids []uint64) ([]*pb.Collection
|
|||||||
|
|
||||||
return g.GetCollections(idStr)
|
return g.GetCollections(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetCollectionsLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
collections, err := g.GetCollections(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(collections[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -143,3 +143,12 @@ func (g *igdb) GetCompanyByStatusIDs(ids []uint64) ([]*pb.Company, error) {
|
|||||||
|
|
||||||
return g.GetCompanies(idStr)
|
return g.GetCompanies(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetCompaniesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
companies, err := g.GetCompanies(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(companies[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetCompanyLogosByIDs(ids []uint64) ([]*pb.CompanyLogo, error) {
|
|||||||
|
|
||||||
return g.GetCompanyLogos(idStr)
|
return g.GetCompanyLogos(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetCompanyLogosLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
companyLogos, err := g.GetCompanyLogos(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(companyLogos[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetCompanyStatusesByIDs(ids []uint64) ([]*pb.CompanyStatus, error
|
|||||||
|
|
||||||
return g.GetCompanyStatuses(idStr)
|
return g.GetCompanyStatuses(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetCompanyStatusesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
companyStatuses, err := g.GetCompanyStatuses(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(companyStatuses[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -61,3 +61,12 @@ func (g *igdb) GetCompanyWebsitesByTypeIDs(ids []uint64) ([]*pb.CompanyWebsite,
|
|||||||
|
|
||||||
return g.GetCompanyWebsites(idStr)
|
return g.GetCompanyWebsites(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetCompanyWebsitesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
companyWebsites, err := g.GetCompanyWebsites(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(companyWebsites[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -77,3 +77,12 @@ func (g *igdb) GetCoversByGameLocalizationIDs(ids []uint64) ([]*pb.Cover, error)
|
|||||||
|
|
||||||
return g.GetCovers(idStr)
|
return g.GetCovers(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetCoversLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
covers, err := g.GetCovers(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(covers[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetDateFormatsByIDs(ids []uint64) ([]*pb.DateFormat, error) {
|
|||||||
|
|
||||||
return g.GetDateFormats(idStr)
|
return g.GetDateFormats(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetDateFormatsLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
dateFormats, err := g.GetDateFormats(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(dateFormats[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -61,3 +61,12 @@ func (g *igdb) GetEventLogosByEventIDs(ids []uint64) ([]*pb.EventLogo, error) {
|
|||||||
|
|
||||||
return g.GetEventLogos(idStr)
|
return g.GetEventLogos(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetEventLogosLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
eventLogos, err := g.GetEventLogos(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(eventLogos[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -77,3 +77,12 @@ func (g *igdb) GetEventNetworksByNetworkTypeIDs(ids []uint64) ([]*pb.EventNetwor
|
|||||||
|
|
||||||
return g.GetEventNetworks(idStr)
|
return g.GetEventNetworks(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetEventNetworksLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
eventNetworks, err := g.GetEventNetworks(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(eventNetworks[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -62,3 +62,12 @@ func (g *igdb) GetEventsByEventLogoIDs(ids []uint64) ([]*pb.Event, error) {
|
|||||||
|
|
||||||
return g.GetEvents(idStr)
|
return g.GetEvents(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetEventsLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
events, err := g.GetEvents(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(events[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetExternalGameSourcesByIDs(ids []uint64) ([]*pb.ExternalGameSour
|
|||||||
|
|
||||||
return g.GetExternalGameSources(idStr)
|
return g.GetExternalGameSources(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetExternalGameSourcesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
externalGameSources, err := g.GetExternalGameSources(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(externalGameSources[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -117,3 +117,12 @@ func (g *igdb) GetExternalGamesByPlatformVersionIDs(ids []uint64) ([]*pb.Externa
|
|||||||
|
|
||||||
return g.GetExternalGames(idStr)
|
return g.GetExternalGames(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetExternalGamesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
externalGames, err := g.GetExternalGames(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(externalGames[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -46,3 +46,12 @@ func (g *igdb) GetFranchisesByIDs(ids []uint64) ([]*pb.Franchise, error) {
|
|||||||
|
|
||||||
return g.GetFranchises(idStr)
|
return g.GetFranchises(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetFranchisesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
franchises, err := g.GetFranchises(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(franchises[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetGameEngineLogosByIDs(ids []uint64) ([]*pb.GameEngineLogo, erro
|
|||||||
|
|
||||||
return g.GetGameEngineLogos(idStr)
|
return g.GetGameEngineLogos(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetGameEngineLogosLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
gameEngineLogos, err := g.GetGameEngineLogos(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(gameEngineLogos[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -78,3 +78,12 @@ func (g *igdb) GetGameEnginesByLogoIDs(ids []uint64) ([]*pb.GameEngine, error) {
|
|||||||
|
|
||||||
return g.GetGameEngines(idStr)
|
return g.GetGameEngines(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetGameEnginesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
gameEngines, err := g.GetGameEngines(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(gameEngines[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -93,3 +93,12 @@ func (g *igdb) GetGameLocalizationsByRegionIDs(ids []uint64) ([]*pb.GameLocaliza
|
|||||||
|
|
||||||
return g.GetGameLocalizations(idStr)
|
return g.GetGameLocalizations(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetGameLocalizationsLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
gameLocalizations, err := g.GetGameLocalizations(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(gameLocalizations[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetGameModesByIDs(ids []uint64) ([]*pb.GameMode, error) {
|
|||||||
|
|
||||||
return g.GetGameModes(idStr)
|
return g.GetGameModes(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetGameModesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
gameModes, err := g.GetGameModes(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(gameModes[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetGameReleaseFormatsByIDs(ids []uint64) ([]*pb.GameReleaseFormat
|
|||||||
|
|
||||||
return g.GetGameReleaseFormats(idStr)
|
return g.GetGameReleaseFormats(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetGameReleaseFormatsLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
gameReleaseFormats, err := g.GetGameReleaseFormats(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(gameReleaseFormats[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetGameStatusesByIDs(ids []uint64) ([]*pb.GameStatus, error) {
|
|||||||
|
|
||||||
return g.GetGameStatuses(idStr)
|
return g.GetGameStatuses(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetGameStatusesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
gameStatuses, err := g.GetGameStatuses(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(gameStatuses[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,28 @@ func (g *igdb) GetGameTimeToBeatsByIDs(ids []uint64) ([]*pb.GameTimeToBeat, erro
|
|||||||
|
|
||||||
return g.GetGameTimeToBeats(idStr)
|
return g.GetGameTimeToBeats(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetGameTimeToBeatsByGameID(id uint64) ([]*pb.GameTimeToBeat, error) {
|
||||||
|
query := fmt.Sprintf(`where game = %d; fields *;`, id)
|
||||||
|
return g.GetGameTimeToBeats(query)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetGameTimeToBeatsByGameIDs(ids []uint64) ([]*pb.GameTimeToBeat, error) {
|
||||||
|
idStrSlice := make([]string, len(ids))
|
||||||
|
for i, id := range ids {
|
||||||
|
idStrSlice[i] = fmt.Sprintf("%d", id)
|
||||||
|
}
|
||||||
|
|
||||||
|
idStr := fmt.Sprintf(`where game = (%s); fields *;`, strings.Join(idStrSlice, ","))
|
||||||
|
|
||||||
|
return g.GetGameTimeToBeats(idStr)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetGameTimeToBeatsLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
gameTimeToBeats, err := g.GetGameTimeToBeats(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(gameTimeToBeats[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetGameTypesByIDs(ids []uint64) ([]*pb.GameType, error) {
|
|||||||
|
|
||||||
return g.GetGameTypes(idStr)
|
return g.GetGameTypes(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetGameTypesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
gameTypes, err := g.GetGameTypes(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(gameTypes[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -77,3 +77,12 @@ func (g *igdb) GetGameVersionFeatureValuesByGameVersionFeatureIDs(ids []uint64)
|
|||||||
|
|
||||||
return g.GetGameVersionFeatureValues(idStr)
|
return g.GetGameVersionFeatureValues(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetGameVersionFeatureValuesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
gameVersionFeatureValues, err := g.GetGameVersionFeatureValues(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(gameVersionFeatureValues[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetGameVersionFeaturesByIDs(ids []uint64) ([]*pb.GameVersionFeatu
|
|||||||
|
|
||||||
return g.GetGameVersionFeatures(idStr)
|
return g.GetGameVersionFeatures(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetGameVersionFeaturesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
gameVersionFeatures, err := g.GetGameVersionFeatures(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(gameVersionFeatures[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -61,3 +61,12 @@ func (g *igdb) GetGameVersionsByGameIDs(ids []uint64) ([]*pb.GameVersion, error)
|
|||||||
|
|
||||||
return g.GetGameVersions(idStr)
|
return g.GetGameVersions(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetGameVersionsLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
gameVersions, err := g.GetGameVersions(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(gameVersions[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -61,3 +61,12 @@ func (g *igdb) GetGameVideosByGameIDs(ids []uint64) ([]*pb.GameVideo, error) {
|
|||||||
|
|
||||||
return g.GetGameVideos(idStr)
|
return g.GetGameVideos(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetGameVideosLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
gameVideos, err := g.GetGameVideos(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(gameVideos[0].Id), nil
|
||||||
|
}
|
||||||
|
9
games.go
9
games.go
@ -158,3 +158,12 @@ func (g *igdb) GetGamesByVersionParentGameIDs(ids []uint64) ([]*pb.Game, error)
|
|||||||
|
|
||||||
return g.GetGames(idStr)
|
return g.GetGames(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetGamesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
games, err := g.GetGames(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(games[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetGenresByIDs(ids []uint64) ([]*pb.Genre, error) {
|
|||||||
|
|
||||||
return g.GetGenres(idStr)
|
return g.GetGenres(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetGenresLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
genres, err := g.GetGenres(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(genres[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -77,3 +77,12 @@ func (g *igdb) GetInvolvedCompaniesByCompanyIDs(ids []uint64) ([]*pb.InvolvedCom
|
|||||||
|
|
||||||
return g.GetInvolvedCompanies(idStr)
|
return g.GetInvolvedCompanies(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetInvolvedCompaniesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
involvedCompanies, err := g.GetInvolvedCompanies(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(involvedCompanies[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetKeywordsByIDs(ids []uint64) ([]*pb.Keyword, error) {
|
|||||||
|
|
||||||
return g.GetKeywords(idStr)
|
return g.GetKeywords(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetKeywordsLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
keywords, err := g.GetKeywords(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(keywords[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetLanguageSupportTypesByIDs(ids []uint64) ([]*pb.LanguageSupport
|
|||||||
|
|
||||||
return g.GetLanguageSupportTypes(idStr)
|
return g.GetLanguageSupportTypes(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetLanguageSupportTypesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
languageSupportTypes, err := g.GetLanguageSupportTypes(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(languageSupportTypes[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -93,3 +93,12 @@ func (g *igdb) GetLanguageSupportsByLanguageSupportTypeIDs(ids []uint64) ([]*pb.
|
|||||||
|
|
||||||
return g.GetLanguageSupports(idStr)
|
return g.GetLanguageSupports(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetLanguageSupportsLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
languageSupports, err := g.GetLanguageSupports(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(languageSupports[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetLanguagesByIDs(ids []uint64) ([]*pb.Language, error) {
|
|||||||
|
|
||||||
return g.GetLanguages(idStr)
|
return g.GetLanguages(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetLanguagesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
languages, err := g.GetLanguages(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(languages[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -77,3 +77,12 @@ func (g *igdb) GetMultiplayerModesByPlatformIDs(ids []uint64) ([]*pb.Multiplayer
|
|||||||
|
|
||||||
return g.GetMultiplayerModes(idStr)
|
return g.GetMultiplayerModes(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetMultiplayerModesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
multiplayerModes, err := g.GetMultiplayerModes(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(multiplayerModes[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetNetworkTypesByIDs(ids []uint64) ([]*pb.NetworkType, error) {
|
|||||||
|
|
||||||
return g.GetNetworkTypes(idStr)
|
return g.GetNetworkTypes(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetNetworkTypesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
networkTypes, err := g.GetNetworkTypes(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(networkTypes[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetPlatformFamiliesByIDs(ids []uint64) ([]*pb.PlatformFamily, err
|
|||||||
|
|
||||||
return g.GetPlatformFamilies(idStr)
|
return g.GetPlatformFamilies(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetPlatformFamiliesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
platformFamilies, err := g.GetPlatformFamilies(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(platformFamilies[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetPlatformLogosByIDs(ids []uint64) ([]*pb.PlatformLogo, error) {
|
|||||||
|
|
||||||
return g.GetPlatformLogos(idStr)
|
return g.GetPlatformLogos(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetPlatformLogosLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
platformLogos, err := g.GetPlatformLogos(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(platformLogos[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -46,3 +46,12 @@ func (g *igdb) GetPlatformTypesByIDs(ids []uint64) ([]*pb.PlatformType, error) {
|
|||||||
|
|
||||||
return g.GetPlatformTypes(idStr)
|
return g.GetPlatformTypes(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetPlatformTypesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
platformTypes, err := g.GetPlatformTypes(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(platformTypes[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -61,3 +61,12 @@ func (g *igdb) GetPlatformVersionCompaniesByCompanyIDs(ids []uint64) ([]*pb.Plat
|
|||||||
|
|
||||||
return g.GetPlatformVersionCompanies(idStr)
|
return g.GetPlatformVersionCompanies(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetPlatformVersionCompaniesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
platformVersionCompanies, err := g.GetPlatformVersionCompanies(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(platformVersionCompanies[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -93,3 +93,12 @@ func (g *igdb) GetPlatformVersionReleaseDatesByDateFormatIDs(ids []uint64) ([]*p
|
|||||||
|
|
||||||
return g.GetPlatformVersionReleaseDates(idStr)
|
return g.GetPlatformVersionReleaseDates(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetPlatformVersionReleaseDatesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
platformVersionReleaseDates, err := g.GetPlatformVersionReleaseDates(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(platformVersionReleaseDates[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -77,3 +77,12 @@ func (g *igdb) GetPlatformVersionsByPlatformLogoIDs(ids []uint64) ([]*pb.Platfor
|
|||||||
|
|
||||||
return g.GetPlatformVersions(idStr)
|
return g.GetPlatformVersions(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetPlatformVersionsLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
platformVersions, err := g.GetPlatformVersions(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(platformVersions[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetPlatformWebsitesByIDs(ids []uint64) ([]*pb.PlatformWebsite, er
|
|||||||
|
|
||||||
return g.GetPlatformWebsites(idStr)
|
return g.GetPlatformWebsites(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetPlatformWebsitesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
platformWebsites, err := g.GetPlatformWebsites(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(platformWebsites[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -92,3 +92,12 @@ func (g *igdb) GetPlatformsByPlatformTypeIDs(ids []uint64) ([]*pb.Platform, erro
|
|||||||
|
|
||||||
return g.GetPlatforms(idStr)
|
return g.GetPlatforms(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetPlatformsLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
platforms, err := g.GetPlatforms(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(platforms[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetPlayerPerspectivesByIDs(ids []uint64) ([]*pb.PlayerPerspective
|
|||||||
|
|
||||||
return g.GetPlayerPerspectives(idStr)
|
return g.GetPlayerPerspectives(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetPlayerPerspectivesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
playerPerspectives, err := g.GetPlayerPerspectives(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(playerPerspectives[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -71,3 +71,12 @@ func (g *igdb) GetPopularityPrimitivesByExternalPopularitySourceIDs(ids []uint64
|
|||||||
|
|
||||||
return g.GetPopularityPrimitives(idStr)
|
return g.GetPopularityPrimitives(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetPopularityPrimitivesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
popularityPrimitives, err := g.GetPopularityPrimitives(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(popularityPrimitives[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -61,3 +61,12 @@ func (g *igdb) GetPopularityTypesByExternalPopularitySourceIDs(ids []uint64) ([]
|
|||||||
|
|
||||||
return g.GetPopularityTypes(idStr)
|
return g.GetPopularityTypes(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetPopularityTypesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
popularityTypes, err := g.GetPopularityTypes(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(popularityTypes[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetRegionsByIDs(ids []uint64) ([]*pb.Region, error) {
|
|||||||
|
|
||||||
return g.GetRegions(idStr)
|
return g.GetRegions(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetRegionsLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
regions, err := g.GetRegions(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(regions[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetReleaseDateRegionsByIDs(ids []uint64) ([]*pb.ReleaseDateRegion
|
|||||||
|
|
||||||
return g.GetReleaseDateRegions(idStr)
|
return g.GetReleaseDateRegions(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetReleaseDateRegionsLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
releaseDateRegions, err := g.GetReleaseDateRegions(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(releaseDateRegions[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetReleaseDateStatusesByIDs(ids []uint64) ([]*pb.ReleaseDateStatu
|
|||||||
|
|
||||||
return g.GetReleaseDateStatuses(idStr)
|
return g.GetReleaseDateStatuses(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetReleaseDateStatusesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
releaseDateStatuses, err := g.GetReleaseDateStatuses(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(releaseDateStatuses[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -109,3 +109,12 @@ func (g *igdb) GetReleaseDatesByStatusIDs(ids []uint64) ([]*pb.ReleaseDate, erro
|
|||||||
|
|
||||||
return g.GetReleaseDates(idStr)
|
return g.GetReleaseDates(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetReleaseDatesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
releaseDates, err := g.GetReleaseDates(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(releaseDates[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -61,3 +61,12 @@ func (g *igdb) GetScreenshotsByGameIDs(ids []uint64) ([]*pb.Screenshot, error) {
|
|||||||
|
|
||||||
return g.GetScreenshots(idStr)
|
return g.GetScreenshots(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetScreenshotsLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
screenshots, err := g.GetScreenshots(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(screenshots[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetThemesByIDs(ids []uint64) ([]*pb.Theme, error) {
|
|||||||
|
|
||||||
return g.GetThemes(idStr)
|
return g.GetThemes(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetThemesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
themes, err := g.GetThemes(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(themes[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -45,3 +45,12 @@ func (g *igdb) GetWebsiteTypesByIDs(ids []uint64) ([]*pb.WebsiteType, error) {
|
|||||||
|
|
||||||
return g.GetWebsiteTypes(idStr)
|
return g.GetWebsiteTypes(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetWebsiteTypesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
websiteTypes, err := g.GetWebsiteTypes(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(websiteTypes[0].Id), nil
|
||||||
|
}
|
||||||
|
@ -77,3 +77,12 @@ func (g *igdb) GetWebsitesByTypeIDs(ids []uint64) ([]*pb.Website, error) {
|
|||||||
|
|
||||||
return g.GetWebsites(idStr)
|
return g.GetWebsites(idStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *igdb) GetWebsitesLength() (int, error) {
|
||||||
|
query := `fields *; sort id desc; limit 1;`
|
||||||
|
websites, err := g.GetWebsites(query)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(websites[0].Id), nil
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user