返回顶部
m

motion运动

|

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
752
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

motion

Motion

通过托管 OAuth 认证访问 Motion API。支持对任务、项目、工作区、评论和重复任务进行完整的增删改查操作。

快速开始

bash

列出任务


python < import urllib.request, os, json
req = urllib.request.Request(https://gateway.maton.ai/motion/v1/tasks)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

基础 URL

https://gateway.maton.ai/motion/{native-api-path}

将 {native-api-path} 替换为实际的 Motion API 端点路径。网关会将请求代理到 api.usemotion.com,并自动注入您的 OAuth 令牌。

认证

所有请求都需要在 Authorization 请求头中携带 Maton API 密钥:

Authorization: Bearer $MATONAPIKEY

环境变量: 将您的 API 密钥设置为 MATONAPIKEY:

bash
export MATONAPIKEY=YOURAPIKEY

获取您的 API 密钥

  1. 1. 登录或注册 maton.ai 账户
  2. 访问 maton.ai/settings
  3. 复制您的 API 密钥

连接管理

在 https://ctrl.maton.ai 管理您的 Motion OAuth 连接。

列出连接

bash
python < import urllib.request, os, json
req = urllib.request.Request(https://ctrl.maton.ai/connections?app=motion&status=ACTIVE)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

创建连接

bash
python < import urllib.request, os, json
data = json.dumps({app: motion}).encode()
req = urllib.request.Request(https://ctrl.maton.ai/connections, data=data, method=POST)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
req.add_header(Content-Type, application/json)
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

获取连接

bash
python < import urllib.request, os, json
req = urllib.request.Request(https://ctrl.maton.ai/connections/{connection_id})
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

响应:
json
{
connection: {
connection_id: 21fd90f9-5935-43cd-b6c8-bde9d915ca80,
status: ACTIVE,
creation_time: 2025-12-08T07:20:53.488460Z,
lastupdatedtime: 2026-01-31T20:03:32.593153Z,
url: https://connect.maton.ai/?session_token=...,
app: motion,
metadata: {}
}
}

在浏览器中打开返回的 url 以完成 OAuth 授权。

删除连接

bash
python < import urllib.request, os, json
req = urllib.request.Request(https://ctrl.maton.ai/connections/{connection_id}, method=DELETE)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

指定连接

如果您有多个 Motion 连接,可以使用 Maton-Connection 请求头指定要使用的连接:

bash
python < import urllib.request, os, json
req = urllib.request.Request(https://gateway.maton.ai/motion/v1/tasks)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
req.add_header(Maton-Connection, 21fd90f9-5935-43cd-b6c8-bde9d915ca80)
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

如果省略此请求头,网关将使用默认(最早创建的)活跃连接。

API 参考

任务操作

列出任务

bash
GET /motion/v1/tasks

查询参数:

  • - workspaceId(字符串)- 按工作区筛选
  • projectId(字符串)- 按项目筛选
  • assigneeId(字符串)- 按负责人筛选
  • status(数组)- 按状态筛选(不能与 includeAllStatuses 同时使用)
  • includeAllStatuses(布尔值)- 返回所有状态的任务
  • label(字符串)- 按标签筛选
  • name(字符串)- 搜索任务名称(不区分大小写)
  • cursor(字符串)- 分页游标

示例:
bash
python < import urllib.request, os, json
req = urllib.request.Request(https://gateway.maton.ai/motion/v1/tasks?workspaceId=WORKSPACE_ID)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

获取任务

bash
GET /motion/v1/tasks/{taskId}

创建任务

bash
POST /motion/v1/tasks
Content-Type: application/json

{
name: 任务名称,
workspaceId: WORKSPACE_ID,
dueDate: 2024-03-15T10:00:00Z,
duration: 60,
priority: HIGH,
description: Markdown 格式的任务描述,
projectId: PROJECT_ID,
assigneeId: USER_ID,
labels: [label1, label2],
autoScheduled: {
startDate: 2024-03-14T09:00:00Z,
deadlineType: SOFT,
schedule: Work Hours
}
}

必填字段:

  • - name(字符串)- 任务标题
  • workspaceId(字符串)- 工作区 ID

可选字段:

  • - dueDate(日期时间,ISO 8601 格式)- 任务截止日期(定时任务必填)
  • duration(字符串 | 数字)- NONE、REMINDER 或分钟数(大于 0 的整数)
  • status(字符串)- 默认为工作区默认状态
  • projectId(字符串)- 关联项目
  • description(字符串)- 支持 GitHub Flavored Markdown
  • priority(字符串)- ASAP、HIGH、MEDIUM 或 LOW
  • labels(数组)- 要添加的标签名称
  • assigneeId(字符串)- 任务分配的用户 ID
  • autoScheduled(对象)- 自动排程设置,包含 startDate、deadlineType(HARD、SOFT、NONE)和 schedule

示例:
bash
python < import urllib.request, os, json
data = json.dumps({
name: 新任务,
workspaceId: WORKSPACE_ID,
priority: HIGH,
duration: 30
}).encode()
req = urllib.request.Request(https://gateway.maton.ai/motion/v1/tasks, data=data, method=POST)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
req.add_header(Content-Type, application/json)
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

更新任务

bash
PATCH /motion/v1/tasks/{taskId}
Content-Type: application/json

{
name: 更新后的任务名称,
status: Completed,
priority: LOW
}

删除任务

bash
DELETE /motion/v1/tasks/{taskId}

移动任务

bash
POST /motion/v1/tasks/{taskId}/move
Content-Type: application/json

{
workspaceId: NEWWORKSPACEID
}

取消分配任务

bash
POST /motion/v1/tasks/{taskId}/unassign

项目操作

列出项目

bash
GET /motion/v1/projects?workspaceId={workspaceId}

查询参数:

  • - workspaceId(字符串

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 motion-1776420088 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 motion-1776420088 技能

通过命令行安装

skillhub install motion-1776420088

下载

⬇ 下载 motion v1.0.0(免费)

文件大小: 4.86 KB | 发布时间: 2026-4-17 19:07

v1.0.0 最新 2026-4-17 19:07
Initial release of Motion API integration with managed OAuth.

- Enables full CRUD operations for tasks, projects, workspaces, comments, and recurring tasks in Motion.
- OAuth connections managed via Maton—secure, flexible setup; supports multiple connections.
- Includes ready-to-use Python code snippets for all operations.
- Detailed API reference for listing, creating, updating, and deleting tasks and projects.
- Requires a Maton API key; clear setup and authentication instructions provided.
- Supports specifying connections for multi-account scenarios.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部