From 1cc563215a44b69d6a136bc97ad7e5fb4f375870 Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Sun, 7 Apr 2024 22:36:27 +0100 Subject: [PATCH] update to correctly use version and not generation --- PokemonAPI/WebServices/GameService.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PokemonAPI/WebServices/GameService.swift b/PokemonAPI/WebServices/GameService.swift index 7575032..81c30f2 100644 --- a/PokemonAPI/WebServices/GameService.swift +++ b/PokemonAPI/WebServices/GameService.swift @@ -471,7 +471,7 @@ 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))) + try await PKMVersion.decode(from: call(endpoint: API.fetchVersionByID(versionID))) } @@ -482,7 +482,7 @@ extension GameService { */ @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))) + try await PKMVersion.decode(from: call(endpoint: API.fetchVersionByName(versionName))) }