ShikoNotifications (shiko_notifications v0.1.0)

Copy Markdown View Source

Elixir SDK for the shiko.vet notification service.

Multi-channel notifications: email, SMS, WhatsApp, push, and Telegram.

Setup

# mix.exs
{:shiko_notifications, "~> 0.1"}

# config/config.exs
config :my_app, :shiko_notifications,
  api_url: "https://notifications.shiko.vet/api/v1",
  client_id: "your_client_id",
  client_secret: "your_client_secret"

Usage

client = ShikoNotifications.client(:my_app, :shiko_notifications)

# Send a single notification
{:ok, response} = ShikoNotifications.send(client, %{
  channel: "email",
  recipient: "user@example.com",
  template_slug: "welcome_email",
  template_data: %{name: "John"}
})

# Bulk send
{:ok, job} = ShikoNotifications.send_bulk(client, %{
  channel: "email",
  template_slug: "promo",
  recipients: [
    %{recipient: "a@test.com", template_data: %{name: "Ana"}},
    %{recipient: "b@test.com", template_data: %{name: "Bob"}}
  ]
})

Contact

Summary

Functions

Build a client from application config.

Get bulk job progress.

Get notification delivery status.

List notifications with optional filters.

Send a single notification.

Send bulk notifications (up to 10,000 recipients).

Functions

client(app, key)

Build a client from application config.

client(api_url, client_id, client_secret)

Build a client manually.

get_analytics(client, endpoint, params \\ %{})

Get analytics data.

get_bulk_status(client, bulk_job_id)

Get bulk job progress.

get_status(client, notification_id)

Get notification delivery status.

list_notifications(client, params \\ %{})

List notifications with optional filters.

send(client, params)

Send a single notification.

send_bulk(client, params)

Send bulk notifications (up to 10,000 recipients).