API 参考写入 API

发布项目

把仓库策展成 project,放到公开站上。

POST/api/v1/projects
POST
/api/v1/projects

把一个仓库策展成 project,也就是放到公开站上。地址同样有两种写法:{ url } 或 { repo: "owner/repo" },加可选的 type(缺省 application)与回调参数。projects:write 不在自助签发范围内,需要管理员逐把 key 开。按仓库去重,返回 status: "existing"。最长 300 秒(要拉 README、翻译技能文档并投递)。

Authorization

bearerAuth
AuthorizationBearer <token>

Authorization: Bearer <key>。key 由控制台自助签发,或管理员在 /dashboard 代签

In: header

Request Body

application/json

url 与 repo 二选一;type 缺省 application;回调参数与登记端点相同

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/projects" \  -H "Content-Type: application/json" \  -d '{}'
{  "ok": true,  "status": "created",  "repo": {    "full_name": "string"  },  "project": {    "id": "string",    "name": "string",    "slug": "string",    "type": "client",    "status": "string",    "description": "string"  },  "readme": {    "synced": true,    "error": "string"  },  "skills": {    "count": 0,    "translated": 0,    "empty": true  },  "authorLinked": true,  "delivered": true,  "delivery": {    "found": 0,    "pushed": 0,    "failed": 0  }}