运行时依赖
安装命令
点击复制本土化适配说明
AFOL 是 Adult Fans of LEGO 的缩写,指乐高成人粉丝。BrickLink 是一个在线市场,专门销售新旧乐高零件、套装和相关商品。因此,AFOL BrickLink 可以翻译为乐高成人粉丝的在线市场平台。更简洁的翻译是:乐高成人粉丝的 BrickLink。 安装说明: 安装命令:["openclaw skills install afol-bricklink"]
技能文档
BrickLink AFOL 技能 当用户请求 BrickLink 物品查找、价格指南、已知颜色、图像、超集/子集、物品映射、订单、库存、反馈、优惠券、通知、运输方式、会员评级或私人会员笔记时使用此技能。 主要接口:scripts/bricklink。 此技能为自包含的存档分布,直接使用 checked-in 引用包装 BrickLink API:OpenAPI 引用:references/openapi/bricklink.yaml 域指导:references/prompts/bricklink-tools.txt CLI 源代码:scripts/bricklink_cli.py 不要抓取供应商文档或发明参数,当 checked-in OpenAPI 引用涵盖端点时。 如果引用不足,请说明缺少的内容。 身份验证 所需环境变量: export BRICKLINK_API_CONSUMER_KEY=... export BRICKLINK_API_CONSUMER_SECRET=... export BRICKLINK_API_TOKEN_VALUE=... export BRICKLINK_API_TOKEN_SECRET=... 可选覆盖: export BRICKLINK_API_BASE_URL=https://api.bricklink.com/api/store/v1 永远不要打印、提交、记录或粘贴真实的 OAuth 凭证。 命令应仅间接引用 BRICKLINK_API_* 变量,通过 CLI 进行。 BrickLink 身份验证位置很重要: 每个 API 请求都使用 OAuth 1.0a 签名,带有 Authorization: OAuth ... 标头。 凭证不属于查询参数或 JSON 请求体中。 GET 查询参数包含在 OAuth 签名基字符串中。 POST/PUT/DELETE JSON 请求体中不包含 OAuth 凭证。 CLI 处理此分离,这是使用它而不是 ad-hoc curl 的主要原因。 CLI 快速参考 从此技能目录运行命令: scripts/bricklink --help scripts/bricklink colors scripts/bricklink color --color-id 11 scripts/bricklink categories scripts/bricklink item --type SET --no 75192-1 scripts/bricklink item-price --type SET --no 75192-1 --guide-type sold --new-or-used N --currency-code EUR scripts/bricklink item-colors --type PART --no 3001 scripts/bricklink item-mapping --type PART --no 3001 --color-id 5 scripts/bricklink element-mapping --element-id 4211111 scripts/bricklink inventory-list --item-type SET --status Y scripts/bricklink orders --direction in --status PAID scripts/bricklink order --order-id 123456 scripts/bricklink notifications scripts/bricklink coupons scripts/bricklink shipping-methods scripts/bricklink member-ratings --username example_user scripts/bricklink member-notes --username example_user 变异命令受到保护。 除非传递 --yes,否则它们不会执行任何操作;首先使用 --dry-run: scripts/bricklink inventory-create --dry-run \ --json '{"item":{"type":"PART","no":"3001"},"color_id":5,"quantity":1,"unit_price":"0.12","new_or_used":"U"}' scripts/bricklink inventory-update --dry-run --inventory-id 123456 \ --json '{"quantity":2,"unit_price":"0.15"}' scripts/bricklink inventory-delete --dry-run --inventory-id 123456 scripts/bricklink order-status --dry-run --order-id 123456 --json '{"status":"PACKED"}' scripts/bricklink feedback-create --dry-run --json '{"order_id":123456,"rating":"POSITIVE","comment":"Thank you"}' scripts/bricklink coupon-create --dry-run --json '{"buyer_name":"example_user","discount_rate":5}' scripts/bricklink member-notes-update --dry-run --username example_user --json '{"note":"Asked about train parts"}' 安全规则 默认为只读:colors、color、categories、category item、item-images、item-supersets、item-subsets、item-price、item-colors item-mapping、element-mapping orders、order、order-items、order-messages、order-feedback inventory-list、inventory feedback、feedback-view notifications、coupons、coupon shipping-methods、shipping-method member-ratings、member-notes 变异操作需要在当前对话中显式用户确认执行:inventory-create、inventory-update、inventory-delete order-update、order-status、order-payment-status、order-drive-thru feedback-create、feedback-reply coupon-create、coupon-update、coupon-delete member-notes-create、member-notes-update、member-notes-delete 存储的凭证不是权限。 在任何变异之前,重新说明确切的操作、端点、目标 ID/用户/订单、有效载荷摘要以及操作是否具有破坏性。 等待显式确认,例如“是的,更新 BrickLink 库存 123456”。 CLI 机械上强制执行此操作:变异命令除非传递 --yes,否则将失败,而 --dry-run 将打印请求形状,凭证以环境变量引用形式红actable。 如果用户要求“出售”、“列出”、“更新库存”、“删除批次”、“留下反馈”或“创建优惠券”,而没有指定平台,并且同时适用于 BrickLink/BrickOwl,则在变异任何内容之前询问要使用哪个市场。 端点覆盖 GET /orders via orders GET /orders/{order_id} via order PUT /orders/{order_id} via order-update --yes GET /orders/{order_id}/items via order-items GET /orders/{order_id}/messages via order-messages GET /orders/{order_id}