☕ StarBot Service Skill

这是 StarBot Service 的 Skill 注册页。OpenClaw Bot 可以通过读取本页面的 JSON-LD 数据自动发现并注册能力。

对于 Bot (Machine Readable)

本页面包含 application/ld+json 脚本块,定义了 Skill 的元数据、API 端点和 Capability 列表。

JSON-LD 内容预览

{
  "@context": "https://schema.openclaw.ai/skill/v1",
  "@type": "BotSkill",
  "name": "Starbucks Service",
  "description": "为 Bot 提供完整的星巴克服务,包括查询附近门店、浏览菜单、推荐产品、创建订单、查询会员信息、使用优惠券等能力。",
  "version": "1.0.0",
  "baseUrl": "http://sbs.ytt.me/api/v1",
  "auth": {
    "type": "Bearer",
    "description": "在 OpenClaw 平台注册时获取 Bot Token,所有请求须携带 Authorization: Bearer "
  },
  "capabilities": [
    {
      "id": "find_nearby_store",
      "intent": [
        "最近的星巴克在哪",
        "附近有星巴克吗"
      ],
      "description": "查找附近星巴克门店",
      "endpoint": {
        "method": "GET",
        "path": "/stores/nearby"
      },
      "requiredParams": [
        "latitude",
        "longitude"
      ],
      "optionalParams": [
        "radius",
        "delivery",
        "is_24h",
        "drive_thru"
      ]
    },
    {
      "id": "get_store_detail",
      "intent": [
        "这家店几点关门",
        "支持外卖吗"
      ],
      "description": "获取门店详情(营业时间/服务)",
      "endpoint": {
        "method": "GET",
        "path": "/stores/:id"
      },
      "requiredParams": [
        "id"
      ],
      "optionalParams": []
    },
    {
      "id": "get_menu",
      "intent": [
        "菜单是什么",
        "有哪些饮品"
      ],
      "description": "获取门店菜单与产品列表",
      "endpoint": {
        "method": "GET",
        "path": "/stores/:id/menu"
      },
      "requiredParams": [
        "id"
      ],
      "optionalParams": [
        "category"
      ]
    },
    {
      "id": "get_product_detail",
      "intent": [
        "拿铁含多少咖啡因",
        "可以加燕麦奶吗"
      ],
      "description": "获取单品详情(成分/定制选项/卡路里)",
      "endpoint": {
        "method": "GET",
        "path": "/products/:id"
      },
      "requiredParams": [
        "id"
      ],
      "optionalParams": []
    },
    {
      "id": "recommend_product",
      "intent": [
        "天气热喝什么好",
        "有什么新品"
      ],
      "description": "基于偏好/场景推荐产品",
      "endpoint": {
        "method": "POST",
        "path": "/products/recommend"
      },
      "requiredParams": [],
      "optionalParams": [
        "weather",
        "time_of_day",
        "occasion",
        "preference"
      ]
    },
    {
      "id": "create_order",
      "intent": [
        "帮我点一杯大杯燕麦拿铁"
      ],
      "description": "创建订单(含定制选项)",
      "endpoint": {
        "method": "POST",
        "path": "/orders"
      },
      "requiredParams": [
        "store_id",
        "items",
        "pickup_type",
        "payment_method"
      ],
      "optionalParams": [
        "member_id",
        "coupon_codes"
      ]
    }
  ],
  "openapi": "http://sbs.ytt.me/openapi.yaml",
  "webhooks": {
    "subscribe_endpoint": "/api/v1/webhooks/subscribe",
    "events": [
      "order.created",
      "order.accepted",
      "order.ready",
      "order.picked_up",
      "order.cancelled",
      "member.stars_updated"
    ]
  }
}