Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game information on some games is missing from the api #2761

Open
V-Karch opened this issue Oct 17, 2024 · 3 comments
Open

Game information on some games is missing from the api #2761

V-Karch opened this issue Oct 17, 2024 · 3 comments
Labels
area/api-web Web API kind/bug Something isn't working

Comments

@V-Karch
Copy link

V-Karch commented Oct 17, 2024

Describe the bug
Data is missing when requesting it from the api using retroachievements-js
I figured I could post this here instead of on the retroachievements-js github since this is about data being stored and not about functionality being broken as far as I'm aware

To Reproduce

  1. Set up retroachievements-js
  2. Make a file titled main.mjs
  3. Fill the file with the following, replacing placeholders with your api information
import { buildAuthorization, getGame } from "@retroachievements/api";

const username = "username";
const webApiKey = "api_key";

const authorization = buildAuthorization({ username, webApiKey });

const game = await getGame(authorization, { gameId: 16211 });

console.log(game);
  1. Run the code with nodejs, node main.mjs
  2. Output:
{
  title: 'Pokemon White Version',
  gameTitle: 'Pokemon White Version',
  consoleId: 18,
  consoleName: 'Nintendo DS',
  console: 'Nintendo DS',
  forumTopicId: 10492,
  flags: 0,
  gameIcon: '/Images/046275.png',
  imageIcon: '/Images/046275.png',
  imageTitle: '/Images/033230.png',
  imageIngame: '/Images/033229.png',
  imageBoxArt: '/Images/032988.png',
  publisher: '',
  developer: '',
  genre: '',
  released: '2010-09-18',
  releasedAtGranularity: 'day'
}

Expected behavior
Publisher should be "Nintendo, The Pokemon Company"
Developer should be "Game Freak"
Genre should be "Turn-based RPG"

This information shows up on the website, but not in the api

Screenshots
No need for a screenshot as the issue is shown in code

Desktop (please complete the following information):

  • OS: Arch Linux x86_64
  • Version of retroachievements-js: 2.1.0

Additional context
Other games that I've seen that are similarly affected are Pokemon Diamond, and Pokemon White 2. However, Pokemon Black's data does display correctly, as shown below:

{
  title: 'Pokemon Black Version',
  gameTitle: 'Pokemon Black Version',
  consoleId: 18,
  consoleName: 'Nintendo DS',
  console: 'Nintendo DS',
  forumTopicId: 10333,
  flags: 0,
  gameIcon: '/Images/046274.png',
  imageIcon: '/Images/046274.png',
  imageTitle: '/Images/032689.png',
  imageIngame: '/Images/032690.png',
  imageBoxArt: '/Images/032691.png',
  publisher: 'Nintendo',
  developer: 'Game Freak',
  genre: 'Turn-based RPG',
  released: '2011-03-04',
  releasedAtGranularity: 'day'
}
@wescopeland wescopeland added kind/bug Something isn't working area/api-web Web API labels Oct 17, 2024
@wescopeland
Copy link
Member

This is happening because the information is associated with linked hubs rather than data in the game table.

@V-Karch
Copy link
Author

V-Karch commented Oct 18, 2024

@wescopeland oh interesting, I wonder how that could've happened

@wescopeland
Copy link
Member

Right now hubs are a bit magical. I believe this API issue will occur for any of the game data that appears to be hyperlinked in the game page. For example, if the genre is a clickable link, I bet it doesn't surface correctly in the API.

Right now hubs are in a bizarre place in the DB. We're going to fix this imminently, but until it's fixed this issue will unfortunately continue to surface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api-web Web API kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants