Kotlin

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

Android 8 and up, and any JVM, from Kotlin or Java. On Maven Central:

implementation("com.bylivebetter:youlmk:0.1.0")

Send

import com.bylivebetter.youlmk.YouLMK
val youlmk = YouLMK("ylk_…")
withContext(Dispatchers.IO) {
youlmk.notify("deploy finished", body = "production · 4 min 12 s", priority = YouLMK.Priority.NORMAL)
}

HttpURLConnection, blocking, a 10 second timeout: on Android call it off the main thread. 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, an IOException with status, code, field and retryAfter. From Java, new YouLMK(token).notify(title) and the overloads.

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

React Native: One call from a React Native or Expo app, with the Node package as it is. · Swift · Payload reference