mirror of
https://codeberg.org/secana/ForgejoKit.git
synced 2026-06-16 05:13:53 -07:00
feat: add fetchRepository function
This commit is contained in:
parent
a73f044623
commit
271839d21b
1 changed files with 5 additions and 0 deletions
|
|
@ -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] {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue