feat: add fetchRepository function

This commit is contained in:
Stefan Hausotte 2026-03-22 11:15:10 +01:00
parent a73f044623
commit 271839d21b

View file

@ -96,6 +96,11 @@ public final class RepositoryService: Sendable {
let url: String let url: String
} }
public func fetchRepository(owner: String, repo: String) async throws -> Repository {
let url = try client.makeRepoURL(owner: owner, repo: repo, path: "")
return try await client.performRequest(url: url, responseType: Repository.self)
}
public func fetchUserRepositories( public func fetchUserRepositories(
page: Int = 1, limit: Int = 20, page: Int = 1, limit: Int = 20,
) async throws -> [Repository] { ) async throws -> [Repository] {