[api-upload-refactor] Document API usage, link from README

This commit is contained in:
Daniel Arantes Loverde
2026-08-29 18:10:30 -03:00
parent fb2e417104
commit 20d761b361
2 changed files with 252 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ This is a repository of essential scripts written in Swift for Loverde Co. used
## Features
- [x] Many usefull scripts extensions
- [x] `API` — typed async networking + multipart uploads. See **[Documentation/API.md](Documentation/API.md)**
Installation
@@ -50,6 +51,21 @@ self.navigationController?.popViewControllerWithHandler {
//Do some stuff after pop
}
```
* Networking with `API`
```swift
struct User: Decodable, Sendable { let id: Int; let name: String }
let user: User = try await API.shared.request(
url: "https://api.example.com/users/{id}",
method: .get,
pathParams: ["id": "42"]
)
```
Full guide — requests, uploads, client certificates, error handling, and why it
beats a hand-rolled `URLSession`: **[Documentation/API.md](Documentation/API.md)**
## Another components
> LCESnackBarView - **great way to send feedback to user**