pushinator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePushinator API
Pushinator API
Use the Pushinator API via direct calls to send push notifications to mobile devices.
curlOfficial docs:https://pushinator.com/api
通过直接调用来使用Pushinator API,向移动设备发送推送通知。
curl官方文档:https://pushinator.com/api
When to Use
适用场景
Use this skill when you need to:
- Send push notifications to mobile devices
- Alert users about events, deployments, or updates
- Integrate notifications into CI/CD pipelines
- Notify yourself when long-running tasks complete
在以下场景中可以使用该技能:
- 向移动设备发送推送通知
- 就事件、部署或更新向用户发出告警
- 将通知集成到CI/CD流水线中
- 当长时间运行的任务完成时通知自己
Prerequisites
前提条件
- Sign up at Pushinator
- Download the Pushinator app on your mobile device
- Create a channel in the Console
- Generate an API token at Tokens
- Store credentials in environment variables
bash
export PUSHINATOR_API_KEY="your-api-token"- 在Pushinator注册账号
- 在移动设备上下载Pushinator应用
- 在控制台中创建一个频道
- 在令牌页面生成API令牌
- 将凭证存储在环境变量中
bash
export PUSHINATOR_API_KEY="your-api-token"Pricing
定价
- Free: 3 devices, 200 notifications/month
- Pro ($9.99/mo): 20 devices, 2,000 notifications/month
- Scale ($29.99/mo): 50 devices, 20,000 notifications/month
Important: When usingin a command that pipes to another command, wrap the command containing$VARin$VAR. Due to a Claude Code bug, environment variables are silently cleared when pipes are used directly.bash -c '...'bashbash -c 'curl -s "https://api.example.com" -H "Authorization: Bearer $API_KEY"'
- 免费版:支持3台设备,每月200条通知
- 专业版(9.99美元/月):支持20台设备,每月2000条通知
- 企业版(29.99美元/月):支持50台设备,每月20000条通知
重要提示:当在管道命令中使用时,请将包含$VAR的命令用$VAR包裹。由于Claude Code的bug,直接使用管道时环境变量会被静默清除。bash -c '...'bashbash -c 'curl -s "https://api.example.com" -H "Authorization: Bearer $API_KEY"'
How to Use
使用方法
Base URL:
https://api.pushinator.comRequired headers:
Authorization: Bearer ${PUSHINATOR_API_KEY}Content-Type: application/json
基础URL:
https://api.pushinator.com必填请求头:
Authorization: Bearer ${PUSHINATOR_API_KEY}Content-Type: application/json
1. Send a Push Notification
1. 发送推送通知
Send a notification to all subscribers of a channel.
Write to :
/tmp/pushinator_request.jsonjson
{
"channel_id": "<your-channel-uuid>",
"content": "Hello from Pushinator!"
}Replace with your actual channel UUID, then run:
<your-channel-uuid>bash
curl -s -X POST "https://api.pushinator.com/api/v2/notifications/send" \
--header "Authorization: Bearer ${PUSHINATOR_API_KEY}" \
--header "Content-Type: application/json" \
-d @/tmp/pushinator_request.jsonResponse:
json
{
"success": true,
"message": "Notification created and being sent to subscribers"
}向频道的所有订阅者发送通知。
写入:
/tmp/pushinator_request.jsonjson
{
"channel_id": "<your-channel-uuid>",
"content": "Hello from Pushinator!"
}将替换为实际的频道UUID,然后运行:
<your-channel-uuid>bash
curl -s -X POST "https://api.pushinator.com/api/v2/notifications/send" \
--header "Authorization: Bearer ${PUSHINATOR_API_KEY}" \
--header "Content-Type: application/json" \
-d @/tmp/pushinator_request.json响应:
json
{
"success": true,
"message": "Notification created and being sent to subscribers"
}2. Send Deployment Notification
2. 发送部署完成通知
Notify when a deployment completes.
Write to :
/tmp/pushinator_request.jsonjson
{
"channel_id": "<your-channel-uuid>",
"content": "Deployment complete! Project deployed to production."
}Replace with your actual channel UUID, then run:
<your-channel-uuid>bash
curl -s -X POST "https://api.pushinator.com/api/v2/notifications/send" \
--header "Authorization: Bearer ${PUSHINATOR_API_KEY}" \
--header "Content-Type: application/json" \
-d @/tmp/pushinator_request.json当部署完成时发送通知。
写入:
/tmp/pushinator_request.jsonjson
{
"channel_id": "<your-channel-uuid>",
"content": "Deployment complete! Project deployed to production."
}将替换为实际的频道UUID,然后运行:
<your-channel-uuid>bash
curl -s -X POST "https://api.pushinator.com/api/v2/notifications/send" \
--header "Authorization: Bearer ${PUSHINATOR_API_KEY}" \
--header "Content-Type: application/json" \
-d @/tmp/pushinator_request.json3. Send Alert with Emoji
3. 发送带表情的告警通知
Include emojis for visual distinction.
Write to :
/tmp/pushinator_request.jsonjson
{
"channel_id": "<your-channel-uuid>",
"content": "Build failed! Check the CI logs."
}Replace with your actual channel UUID, then run:
<your-channel-uuid>bash
curl -s -X POST "https://api.pushinator.com/api/v2/notifications/send" \
--header "Authorization: Bearer ${PUSHINATOR_API_KEY}" \
--header "Content-Type: application/json" \
-d @/tmp/pushinator_request.json使用表情符号实现视觉区分。
写入:
/tmp/pushinator_request.jsonjson
{
"channel_id": "<your-channel-uuid>",
"content": "Build failed! Check the CI logs."
}将替换为实际的频道UUID,然后运行:
<your-channel-uuid>bash
curl -s -X POST "https://api.pushinator.com/api/v2/notifications/send" \
--header "Authorization: Bearer ${PUSHINATOR_API_KEY}" \
--header "Content-Type: application/json" \
-d @/tmp/pushinator_request.jsonRequest Parameters
请求参数
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Yes | UUID of the notification channel |
| string | Yes | Notification message text |
| 参数 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
| string | 是 | 通知频道的UUID |
| string | 是 | 通知消息文本 |
HTTP Status Codes
HTTP状态码
| Code | Description |
|---|---|
| 2xx | Success - notification sent |
| 4xx | Invalid request or missing parameters |
| 5xx | Server error - retry recommended |
| 状态码 | 描述 |
|---|---|
| 2xx | 成功 - 通知已发送 |
| 4xx | 请求无效或参数缺失 |
| 5xx | 服务器错误 - 建议重试 |
Guidelines
使用指南
- Keep messages concise: Push notifications have limited display space
- Use channels for topics: Create separate channels for different notification types
- Rate limiting: Stay within your plan's monthly notification limit
- Include context: Make notifications actionable with relevant details
- 保持消息简洁:推送通知的显示空间有限
- 按主题使用频道:为不同类型的通知创建单独的频道
- 速率限制:不要超出你的套餐每月通知限额
- 包含上下文信息:在通知中添加相关细节,使其具有可操作性