@trycourier/cli
Advanced tools
Comparing version 1.4.0 to 1.4.1
@@ -94,3 +94,3 @@ import React, { useEffect, useState } from 'react'; | ||
let payload = constructPayload(params); | ||
if (!payload.message.to) { | ||
if (Array.isArray(payload.message.to) && !payload.message.to.length) { | ||
return React.createElement(UhOh, { text: "You must specify a recipient." }); | ||
@@ -97,0 +97,0 @@ } |
{ | ||
"name": "@trycourier/cli", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "bin": { |
@@ -42,7 +42,7 @@ # Courier CLI | ||
- `courier config` – Set your Courier API key in `~/.courier` | ||
- `courier config` – Set your Courier API key | ||
- `courier whoami` – Display the currently authenticated workspace | ||
- `courier send` - Send a notification to a user, list, or audience | ||
- `courier track` - Send an event to test your Courier Automations | ||
- `courier digests:flush` - Send an event to test your Courier Automations | ||
- `courier track` - Send a track event to trigger a Courier Automations | ||
- `courier digests:flush` – Flush any currently queued events for a given user + digest | ||
- `courier translations:upload` - Upload .PO files to your Courier workspace | ||
@@ -53,2 +53,19 @@ - `courier translations:download` - Download .PO files from your Courier workspace | ||
## Examples | ||
``` | ||
$ courier send --tel 555-867-5309 --body "Hey Jenny\\!" | ||
$ courier send --user user123 --template my-template-id --foo bar | ||
$ courier send --email user@example.com --title "My Subject" --body "My Body" | ||
$ courier send --user user123 --title "Important\\!" --body "Lorem Ipsum" --channels sms,push | ||
$ courier send --user user123 --elemental my-template.json --foo bar | ||
$ courier track my-event user123 --foo bar | ||
$ courier digests:flush user123 my-digest-id | ||
$ courier translations:upload en-US ./translations/en-US.po | ||
$ courier translations:download en-US --text > example.en-US.po | ||
``` | ||
## License | ||
@@ -55,0 +72,0 @@ |
48262
76