Liking cljdoc? Tell your friends :D

wagoe.push.ports

Protocol definitions for push notification delivery, device management, and analytics.

Protocol definitions for push notification delivery, device management, and analytics.
raw docstring

IAPNsProvidercljprotocol

apns-send!clj

(apns-send! this payload device-token)

Send APNs notification. Returns {:success? bool :apns-id str :error map}

Send APNs notification. Returns {:success? bool :apns-id str :error map}

apns-send-batch!clj

(apns-send-batch! this payload device-tokens)

Send to multiple APNs devices. Returns per-token results.

Send to multiple APNs devices. Returns per-token results.
source

IDeviceLookupcljprotocol

Optional beside IDeviceTokenStore: a store without it is scanned instead.

Optional beside IDeviceTokenStore: a store without it is scanned instead.

find-user-devicesclj

(find-user-devices this user-id device-token app-id)

The user's active devices with this token, only under app-id unless it is nil.

The user's active devices with this token, only under app-id unless it is nil.
sourceraw docstring

IDeviceTokenStorecljprotocol

cleanup-stale-tokens!clj

(cleanup-stale-tokens! this max-age-days)

Purge tokens not used within max-age-days.

Purge tokens not used within max-age-days.

get-devices-by-platformclj

(get-devices-by-platform this platform opts)

Active devices for platform, ordered by id. opts: {:limit n :after-id id}: keyset paging, so deactivating a device mid-broadcast shifts no page.

Active devices for platform, ordered by id. opts: {:limit n :after-id id}:
keyset paging, so deactivating a device mid-broadcast shifts no page.

get-user-devicesclj

(get-user-devices this user-id)

All active devices for user.

All active devices for user.

mark-token-invalid!clj

(mark-token-invalid! this device-token)

Flag token as invalid after provider rejection.

Flag token as invalid after provider rejection.

register-device!clj

(register-device! this user-id device-info)

Store device token. device-info: {:token str :platform kw :app-id str}

Store device token. device-info: {:token str :platform kw :app-id str}

unregister-device!clj

(unregister-device! this user-id device-token)

Remove device token.

Remove device token.
source

IFCMProvidercljprotocol

fcm-send!clj

(fcm-send! this payload)

Send FCM message. Returns {:success? bool :message-id str :error map}

Send FCM message. Returns {:success? bool :message-id str :error map}

fcm-send-multicast!clj

(fcm-send-multicast! this payload tokens)

Send to multiple FCM tokens. Returns per-token results.

Send to multiple FCM tokens. Returns per-token results.

fcm-validate-tokenclj

(fcm-validate-token this token)

Dry-run send to check token validity.

Dry-run send to check token validity.
source

IPerDeviceSendcljprotocol

Optional beside IFCMProvider and IAPNsProvider: each device its own payload, sent concurrently. Without it, push sends to each device in turn.

Optional beside IFCMProvider and IAPNsProvider: each device its own payload,
sent concurrently. Without it, push sends to each device in turn.

send-each!clj

(send-each! this sends)

sends: [[device-token payload] ...]. Per-token results, in order.

sends: [[device-token payload] ...]. Per-token results, in order.
sourceraw docstring

IPushAnalyticsStorecljprotocol

cleanup-old-events!clj

(cleanup-old-events! this retention-days)

Purge analytics events older than retention-days.

Purge analytics events older than retention-days.

get-push-statsclj

(get-push-stats this notification-id opts)

Aggregate stats: sent/delivered/opened/failed counts.

Aggregate stats: sent/delivered/opened/failed counts.

record-delivery!clj

(record-delivery! this event)

Log client-reported delivery confirmation.

Log client-reported delivery confirmation.

record-open!clj

(record-open! this event)

Log client-reported notification open.

Log client-reported notification open.

record-send!clj

(record-send! this event)

Log send attempt with provider response.

Log send attempt with provider response.
source

IPushServicecljprotocol

broadcast!clj

(broadcast! this notification-id data opts)

Send to all registered devices matching opts: {:platform kw, :app-id str}

Send to all registered devices matching opts: {:platform kw, :app-id str}

schedule-push!clj

(schedule-push! this notification-id data opts scheduled-at)

Schedule push for future delivery via jobs.

Schedule push for future delivery via jobs.

send-push!clj

(send-push! this notification-id data opts)

Enqueue push delivery for all user devices. opts: {:user-id uuid, :locale kw}

Enqueue push delivery for all user devices. opts: {:user-id uuid, :locale kw}
source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close