Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

0.4.0

Compare
Choose a tag to compare
@Jeehut Jeehut released this 21 Nov 15:05
· 63 commits to main since this release

Added

  • Microya now supports Combine publishers, just call publisher(on:decodeBodyTo:) or publisher(on:) instead of performRequest(on:decodeBodyTo:) or performRequest(on:) and you'll get an AnyPublisher request stream to subscribe to. In success cases you will receive the decoded typed object, in error cases an ApiError object exactly like within the performRequest completion closure. But instead of a Result type you can use sink or catch from the Combine framework.

Changed

  • The queryParameters is no longer of type [String: String], but [String: QueryParameterValue] now. Existing code like ["search": searchTerm] will need to be updated to ["search": .string(searchTerm)]. Apart from .string this now also allows specifying an array of strings like so: ["tags": .array(userSelectedTags)]. String & array literals are supported directly, e.g. ["sort": "createdAt"] or ["sort": ["createdAt", "id"]].