{
  "name": "download",
  "title": "下载",
  "description": "从网络下载文件到本地指定路径。触发关键词：下载文件、下载资源、文件下载",
  "category": "网络请求",
  "group": "web",
  "type": "function",
  "main": "./index.js",
  "params": [
    {
      "name": "files",
      "description": "下载文件时的文件路径",
      "type": "array",
      "items": {
        "type": "object",
        "description": "文件路径和文件名",
        "properties": {
          "url": {
            "type": "string",
            "description": "文件网址"
          },
          "file": {
            "type": "string",
            "description": "下载后保存的文件路径"
          }
        }
      }
    },
    {
      "name": "headers",
      "description": "请求协议头",
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "请求头键"
        },
        "value": {
          "type": "string",
          "description": "请求头值"
        }
      }
    },
    {
      "name": "cookies",
      "description": "Cookie，多个Cookie用分号隔开，每个Cookie用等号隔开",
      "type": "string"
    }
  ],
  "returns": [
    {
      "name": "code",
      "type": "number",
      "description": "执行状态码，0表示成功"
    },
    {
      "name": "msg",
      "type": "string",
      "description": "执行状态成功时为空，失败时为错误信息"
    },
    {
      "name": "files",
      "type": "array",
      "items": {
        "type": "object",
        "description": "下载成功的文件路径和文件名",
        "properties": {
          "url": {
            "type": "string",
            "description": "文件网址"
          },
          "file": {
            "type": "string",
            "description": "下载后保存的绝对文件路径"
          }
        }
      }
    }
  ]
}