Swift

One call that wraps the HTTP API's bearer door, with nothing else in the dependency tree. The token is your source's ylk_…, from its page.

Install

iOS 15, macOS 12, watchOS 8 and tvOS 15 and up. In Xcode: File, Add Package Dependencies, paste the URL. In a package, the dependency line:

.package(url: "https://github.com/bylivebetter/youlmk-swift", from: "0.1.0")

Send

import YouLMK
let youlmk = YouLMK(token: "ylk_…")
let sent = try await youlmk.notify("deploy finished", body: "production · 4 min 12 s", priority: .normal)

URLSession, async, a 10 second timeout. The arguments are the payload's fields in camelCase (urlLabel, fields, group, image, actions) plus idempotencyKey. The answer is a YouLMK.Result with id, receipt, grouped and held; an error is a YouLMK.Error with status, the door's code, the field for a 422 and retryAfter for a 429.

Inside an app you ship

A token that ships inside an app is public: an app you distribute sends through its own server, or through a source whose Reach you are happy to let strangers reach.

Next

Kotlin: One call from an Android app or any JVM, from Kotlin or Java. No dependencies. · React Native · Payload reference