Skip to content

Commit c678266

Browse files
committed
🕸 Update dependencies (monki-projects-model-swift)
1 parent e6aace5 commit c678266

File tree

5 files changed

+13
-47
lines changed

5 files changed

+13
-47
lines changed

Package.resolved

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"repositoryURL": "https://github.com/MonkiProjects/monki-projects-model-swift",
77
"state": {
88
"branch": null,
9-
"revision": "8b4cc80f99f2974580c04e2f585622d032c51a75",
10-
"version": "0.5.3"
9+
"revision": "c268ca4e5e145e11300bb1a085afcccc49685e77",
10+
"version": "0.6.0"
1111
}
1212
},
1313
{

Package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ let package = Package(
1919
.package(
2020
name: "monki-projects-model",
2121
url: "https://github.com/MonkiProjects/monki-projects-model-swift",
22-
.upToNextMinor(from: "0.5.0")
22+
.upToNextMinor(from: "0.6.0")
2323
),
2424
],
2525
targets: [

Sources/MonkiProjectsAPIClient/Helpers/PlaceState+QueryItems.swift

-19
This file was deleted.

Sources/MonkiProjectsAPIClient/MPAPIPlaceRepository.swift

+6-15
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,15 @@ public final class MPAPIPlaceRepository: WebAPI, WebPlacesRepository {
2929

3030
// MARK: - Combine Publishers
3131

32-
public func listPlaces(
33-
state: Place.State? = nil,
34-
page: PageRequest? = nil
35-
) -> AnyPublisher<Page<Place.Public>, Error> {
36-
return self.authenticatedRequest(endpoints.listPlaces(state: state, page: page))
32+
public func listPlaces(page: PageRequest? = nil) -> AnyPublisher<Page<Place.Public>, Error> {
33+
return self.authenticatedRequest(endpoints.listPlaces(page: page))
3734
}
3835

3936
// MARK: - Swift async/await
4037

4138
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
42-
public func listPlaces(
43-
state: Place.State? = nil,
44-
page: PageRequest? = nil
45-
) async throws -> Page<Place.Public> {
46-
return try await self.authenticatedRequest(endpoints.listPlaces(state: state, page: page))
39+
public func listPlaces(page: PageRequest? = nil) async throws -> Page<Place.Public> {
40+
return try await self.authenticatedRequest(endpoints.listPlaces(page: page))
4741
}
4842

4943
}
@@ -54,11 +48,8 @@ extension MPAPIPlaceRepository {
5448

5549
let server: APIServer
5650

57-
func listPlaces(
58-
state: Place.State? = nil,
59-
page: PageRequest? = nil
60-
) -> Endpoint {
61-
return self.get("/places/v1", queryItems: state.queryItems + page.queryItems)
51+
func listPlaces(page: PageRequest? = nil) -> Endpoint {
52+
return self.get("/places/v1", queryItems: page.queryItems)
6253
}
6354

6455
}

Sources/MonkiProjectsAPIClient/Protocols/WebPlacesRepository.swift

+4-10
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,12 @@ public protocol WebPlacesRepository: AnyObject, WebAPI {
1616

1717
// MARK: - Combine Publishers
1818

19-
func listPlaces(
20-
state: Place.State?,
21-
page: PageRequest?
22-
) -> AnyPublisher<Page<Place.Public>, Error>
19+
func listPlaces(page: PageRequest?) -> AnyPublisher<Page<Place.Public>, Error>
2320

2421
// MARK: - Swift async/await
2522

2623
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
27-
func listPlaces(
28-
state: Place.State?,
29-
page: PageRequest?
30-
) async throws -> Page<Place.Public>
24+
func listPlaces(page: PageRequest?) async throws -> Page<Place.Public>
3125

3226
}
3327

@@ -36,12 +30,12 @@ public protocol WebPlacesRepository: AnyObject, WebAPI {
3630
extension WebPlacesRepository {
3731

3832
public func listPlaces() -> AnyPublisher<Page<Place.Public>, Error> {
39-
return self.listPlaces(state: nil, page: nil)
33+
return self.listPlaces(page: nil)
4034
}
4135

4236
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
4337
public func listPlaces() async throws -> Page<Place.Public> {
44-
return try await self.listPlaces(state: nil, page: nil)
38+
return try await self.listPlaces(page: nil)
4539
}
4640

4741
}

0 commit comments

Comments
 (0)