UNPKG

@mxlabs/okxnotify

Version:

OKX notification package with Feishu, Cloudflare Workers, and Gemini AI agent integration - Complete bundle

52 lines (28 loc) 1.54 kB
# @mxlabs/okxnotify Complete standalone OKX notification package with Feishu, Cloudflare Workers, and Gemini AI agent integration. ## Installation ```bash pnpm install @mxlabs/okxnotify ``` ## Usage ## ES Modules Example ```javascript import { sendFeishuNotification } from '@mxlabs/okxnotify'; await sendFeishuNotification('webhook token', 'test'); ``` ## 接口列表说明 #### 飞书通知相关 - `sendFeishuNotification(webhookToken: string, message: string)` - 发送简单文本消息到飞书机器人 - `feishuRicherNotification(webhookToken: string, params: { title: string; messages: string[] })` - 发送富文本卡片消息到飞书机器人 #### Twitter 数据采集相关 - `batchfetchSearchByKeywordList(keywordList: string[])` - 批量根据关键词列表搜索Twitter内容 - `batchfetchSearchCommunitiesTop(keywordList: string[])` - 批量获取Twitter社区热门内容 - `batchGetTwitterInfo(kolList: string[], params?: { lastHours?: number })` - 批量获取Twitter用户推文的内容,同时支持最近多少小时信息 #### AI 分析相关 - `fetchGeminiTextAnlysis(apiKey: string, text: string, model: string, generationConfig?: GEMINI_GENERATION_CONFIG;)` - 使用Gemini AI进行文本分析,支持自定义模型参数、温度设置和最大token限制 @link https://ai.google.dev/api/generate-content?hl=zh-cn#v1beta.GenerationConfig #### 工具函数 - `isStringContains(source: string, target: string)` - 检查字符串是否包含目标字符串 ### 使用示例 ## License MIT