js-cli-serve
    js-cli-serve
    • 获取物料列表
      GET
    • 获取项目 oss 文件
      GET
    • 根据 id 获取物料详情
      GET
    • 创建物料
      POST
    • 获取物料平台详情
      GET
    • 获取页面模版
      GET
    • 获取项目模版
      GET
    • 创建模板
      POST
    • 更新模板信息
      PATCH

      创建物料

      开发中
      POST
      /components

      请求参数

      Body 参数application/json
      object {0}
      示例
      {
        "component": {
          "type": "component",
          "projectName": "asd",
          "projectVersion": "1.0.0",
          "projectTemplate": "@js-cli/react-component",
          "componentDescription": "sadsad",
          "name": "asd",
          "className": "asd",
          "version": "1.0.0",
          "description": "sadsad",
          "buildPath": "dist",
          "examplePath": "example/dist",
          "npmName": "@js-cli/react-component",
          "npmVersion": "1.0.3",
          "exampleList": [
            "index.html"
          ],
          "exampleRealPath": "/Users/gjs/Desktop/test1/example/dist"
        },
        "git": {
          "remote": "git@github.com:GongJS/asd.git",
          "version": "1.0.0",
          "branch": "dev/1.0.0",
          "login": "GongJS",
          "owner": "user"
        }
      }

      示例代码

      Shell
      JavaScript
      Java
      Swift
      Go
      PHP
      Python
      HTTP
      C
      C#
      Objective-C
      Ruby
      OCaml
      Dart
      R
      请求示例请求示例
      Shell
      JavaScript
      Java
      Swift
      curl --location --request POST 'https://material.ooaaoo.top/api/v1/components' \
      --header 'Content-Type: application/json' \
      --data-raw '{
         "component": {
            "type": "component",
            "projectName": "asd",
            "projectVersion": "1.0.0",
            "projectTemplate": "@js-cli/react-component",
            "componentDescription": "sadsad",
            "name": "asd",
            "className": "asd",
            "version": "1.0.0",
            "description": "sadsad",
            "buildPath": "dist",
            "examplePath": "example/dist",
            "npmName": "@js-cli/react-component",
            "npmVersion": "1.0.3",
            "exampleList": [
               "index.html"
            ],
            "exampleRealPath": "/Users/gjs/Desktop/test1/example/dist"
         },
         "git": {
            "remote": "git@github.com:GongJS/asd.git",
            "version": "1.0.0",
            "branch": "dev/1.0.0",
            "login": "GongJS",
            "owner": "user"
         }
      }'

      返回响应

      🟢200成功
      application/json
      Body
      object {0}
      示例
      {}
      上一页
      根据 id 获取物料详情
      下一页
      获取物料平台详情
      Built with