Client basics
Mountaya is the one type that calls the network. Every method is async throws and named after the API's operation.
Build one client and share it: it is Sendable. language asks the API to answer in French.
An operation hangs where the API files it: studio and agent for the Map Studio API, data for the Data API, tiles for the Tile API. Its method is the operation's id:
A path parameter is an argument by its name, the query is one query: value, and a body is one body: value.
A body takes its required fields as arguments and its optional ones in a trailing closure:
A field left nil is not sent. A nullable one set to .some(nil) sends null, which clears it: $0.description = .some(nil).
A Data API call can name the fields it wants, so the API sends less:
Fields you did not select come back nil.
A stream is an EventStream you read with for try await. It opens as you read its first frame:
The stream reconnects and resumes on its own until you stop reading it.
A REST call answers a Response: the data, the status, and the answer's request id and tag.
Quote the requestId to support.