Repository navigation
feat(api): add ArtworkType and ImageType models and endpoints - #49
Merged
Merged
Conversation
Adds the artwork_types and image_types endpoints and models, plus the artwork_type and image_type references on Artwork and image_type on Cover, per the IGDB API docs. Artwork Type is deprecated upstream in favor of Image Type but still returned by the API. Closes #47 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PxwSfew6PVJAv75hDKBpMm
The live Artworks tests already cover deserializing the new ArtworkType and ImageType references. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PxwSfew6PVJAv75hDKBpMm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #47.
Adds the missing
artwork_typesendpoint andArtworkTypemodel. The IGDB docs mark Artwork Type as deprecated in favor of Image Type, so this PR adds that too, instead of shipping a type that's already on its way out.Changes
ArtworkType(checksum, created_at, name, slug, updated_at) andImageType(checksum, created_at, name, updated_at), following theWebsiteType/PlatformTypepattern.ArtworkTypes = "artwork_types"andImageTypes = "image_types".ArtworkgainsArtworkTypeandImageTypereferences.CovergainsImageType. Per the docs, those are the only two models that exposeimage_type.[Obsolete], matching how the repo has handled upstream deprecations before (keep until IGDB removes them).Tests
IGDB.Tests/Artworks.csadds 5 live API tests covering both type endpoints, plus Artwork and Cover with the new references expanded. These also exercise deserialization of the new properties.🤖 Generated with Claude Code
https://claude.ai/code/session_01PxwSfew6PVJAv75hDKBpMm