SuperAPI AI 工具集

luma-calendar

办公与效率

查看项目

更新于 10-22 16:15

技能介绍

用途

该技能用于通过 Luma 公开 API 管理 Luma 活动与嘉宾,覆盖查看日历、查询活动、创建活动、查看与添加嘉宾等常见运营操作。

主要能力

提供的子命令包括:

  • get-self:验证凭证并获取已认证用户资料
  • get-calendar:获取日历详情(名称、slug、描述)
  • list-events:列出日历上的活动,支持按开始时间范围过滤与分页
  • get-event:获取指定活动的完整详情
  • create-event:创建新活动
  • get-guests:列出某活动的已注册嘉宾
  • add-guests:向某活动添加一个或多个嘉宾

list-events 支持 --after、--before(ISO 8601 时间)和 --pagination-cursor 参数;create-event 支持 --name(必填)、--start-at、--end-at、--timezone、--description、--geo-address-json、--url;get-guests / add-guests 需要 --event-api-id,add-guests 还需提供 JSON 数组格式的 --guests。

使用方式

统一通过脚本调用:

python3 "$SKILL_DIR/scripts/luma_calendar.py" <subcommand> [options]

其中 $SKILL_DIR 指该技能的安装目录;若代理未自动设置,需替换为实际路径。

示例:

# 验证 API 密钥
python3 "$SKILL_DIR/scripts/luma_calendar.py" get-self

# 列出即将举行的活动
python3 "$SKILL_DIR/scripts/luma_calendar.py" list-events

# 列出指定日期之后的活动
python3 "$SKILL_DIR/scripts/luma_calendar.py" list-events --after 2026-06-01T00:00:00Z

# 查看指定活动详情
python3 "$SKILL_DIR/scripts/luma_calendar.py" get-event --api-id evt-abc123

# 创建活动
python3 "$SKILL_DIR/scripts/luma_calendar.py" create-event \
  --name "Builder Night Hanoi" \
  --start-at "2026-07-10T18:00:00Z" \
  --end-at "2026-07-10T21:00:00Z" \
  --timezone "Asia/Ho_Chi_Minh" \
  --description "Monthly builder meetup in Hanoi."

# 列出活动嘉宾
python3 "$SKILL_DIR/scripts/luma_calendar.py" get-guests --event-api-id evt-abc123

# 添加嘉宾
python3 "$SKILL_DIR/scripts/luma_calendar.py" add-guests \
  --event-api-id evt-abc123 \
  --guests '[{"email":"alice@example.com","name":"Alice"},{"email":"bob@example.com","name":"Bob"}]'

输出格式

所有子命令向标准输出打印 JSON 对象。get-calendar / get-event 直接返回对象(含 api_id、name、start_at、url 等字段);list-events 与 get-guests 返回 {"entries": [...], "has_more": bool, "next_cursor": "..."};add-guests / create-event 返回创建或更新的资源。出错时打印 API 错误 JSON 并以退出码 1 结束。

前提条件

需设置环境变量 LUMA_API_KEY,该密钥可从 Luma 日历的 API 设置页面获取,且仅作用于单个日历。

适用场景与限制

适用于活动运营人员或自动化代理批量查询活动、核对报名名单、创建活动及导入嘉宾。限制方面:需有效的 Luma API 密钥;密钥按日历隔离;未提供其他平台支持、收费或效果相关信息。