Skip to content

Conversation

codename-irvin
Copy link
Contributor

This PR addresses #42. It removes deprecated fields, adds new types, and adds new endpoints to adhere to the changes outlined here.

@codename-irvin
Copy link
Contributor Author

@kamranayub I am still testing these changes but would appreciate your feedback when you get a chance.

@kamranayub
Copy link
Owner

@kamranayub I am still testing these changes but would appreciate your feedback when you get a chance.

Sweet! Thanks a ton for getting this started. I'll try to take a look this week.

@codename-irvin
Copy link
Contributor Author

Hey, no problem! Thanks for making the SDK in the first place!

@codename-irvin codename-irvin marked this pull request as ready for review May 22, 2025 12:52
@codename-irvin
Copy link
Contributor Author

@kamranayub this PR is ready for review.

@kamranayub
Copy link
Owner

I should have some time to review this weekend 👍

@kamranayub kamranayub requested review from kamranayub and Copilot May 22, 2025 13:26
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates several enum-based fields to table-based models in order to address deprecation and align with the new IGDB API changes. Key updates include the removal of deprecated enums from Platform, Game, Company, and other models; the introduction of new table model classes for game types, statuses, age ratings, and more; and endpoint updates in IGDBApi to support the new data structures.

Reviewed Changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated no comments.

Show a summary per file
File Description
IGDB/Models/Platform.cs Removed PlatformCategory enum and added PlatformType property.
IGDB/Models/GameType.cs Added new GameType table model.
IGDB/Models/GameStatus.cs Added new GameStatus table model.
IGDB/Models/GameReleaseFormat.cs Added new GameReleaseFormat table model.
IGDB/Models/Game.cs Removed deprecated enums and added IdentityOrValue fields for GameStatus and GameType.
IGDB/Models/ExternalGame.cs Removed ExternalCategory enum and updated properties to use new table models.
IGDB/Models/DateFormat.cs Added new DateFormat table model.
IGDB/Models/CompanyWebsite.cs Removed CompanyWebsiteCategory enum and added a Type property.
IGDB/Models/Company.cs Removed enum fields and added new IdentityOrValue fields for date format and company status.
IGDB/Models/Character.cs Removed Gender and Species enums and replaced them with CharacterGender and CharacterSpecies properties.
IGDB/Models/AgeRating*.cs Migrated from enum based definitions to new table model implementations.
IGDB/IGDBApi.cs Updated endpoint constants to reflect the new table-based models.

Copy link
Owner

@kamranayub kamranayub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The model changes all look good, but I would like some new test coverage for a selection of the new fields. I can add those tonight I think or welcome to add some.

Also the data dumps need to be tested as well with the new fields. I could take a look at that.

Edit: I believe the test failure is expected in GH actions because secrets aren't available in fork PRs but I could enable that

@kamranayub
Copy link
Owner

kamranayub commented May 25, 2025

Looks like the enum fields are just Reference IDs (long), not actual identity or value types like reference fields (i.e. they cannot be expanded).

I'll update the model definitions to be accurate.

edit: Hmm, actually, I don't understand because they should follow same convention as other references and be expanded but the test was failing 🤔

From the docs:

This change will allow you to expand these fields instead of keeping hardcoded enums

So it should work but I am not seeing the expansion, or even the field, being returned in a query.

image

Still looking into it 😅

update 2: OK I am dumb, a 0 for status means it's released, but that's the default so it's empty 😅 I just need to test another game with an actual status.

@kamranayub
Copy link
Owner

@codename-irvin I cannot push to your PR branch (you might have needed to enable "Allow maintainers to push to PR/branch" when creating the PR).

I opened a new #45 so I can push my changes, but this looks great, thank you a ton!!

@kamranayub kamranayub closed this May 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants