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

[API] Incorrect API enum used for fetching version #26

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lmcjt37
Copy link

@lmcjt37 lmcjt37 commented Apr 7, 2024

Currently in version 6.1.1, it is pointing to the incorrect API enum, and therefore incorrect endpoint, when we call fetchVersion which is currently using 'Generation'. See below for the incorrect calls.

This is only in the 'Async Services' of the package, the other areas are correctly using the right endpoint

Currently

// MARK: - Async Services

extension GameService {
...
@available(macOS 12.0, iOS 15.0, tvOS 15.0, watchOS 8.0, *)
public func fetchVersion(_ versionID: Int) async throws -> PKMVersion {
    try await PKMVersion.decode(from: call(endpoint: API.fetchGenerationByID(versionID)))
}

@available(macOS 12.0, iOS 15.0, tvOS 15.0, watchOS 8.0, *)
public func fetchVersion(_ versionName: String) async throws -> PKMVersion {
    try await PKMVersion.decode(from: call(endpoint: API.fetchGenerationByName(versionName)))
}

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.

1 participant