134 lines
3.2 KiB
JSON
134 lines
3.2 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "CNB OPENAPI",
|
|
"contact": {
|
|
"name": "Open API Support",
|
|
"url": "https://docs.cnb.cool/",
|
|
"email": "cnb@tencent.com"
|
|
},
|
|
"version": "1.0"
|
|
},
|
|
"paths": {
|
|
"/{slug}/-/contributor/trend": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [],
|
|
"tags": [
|
|
"RepoContributor"
|
|
],
|
|
"summary": "查询仓库贡献者前 100 名的详细趋势数据。Query detailed trend data for top 100 contributors of the repository.",
|
|
"operationId": "GetRepoContributorTrend",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "slug",
|
|
"name": "slug",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 14,
|
|
"description": "limit, 0~100",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"default": false,
|
|
"description": "exclude_external_users, true|false",
|
|
"name": "exclude_external_users",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/web.RepoContribTrend"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/die.WebError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/die.WebError"
|
|
}
|
|
}
|
|
},
|
|
"description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-code:r"
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"web.RepoContribTrend": {
|
|
"type": "object",
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/definitions/web.Meta"
|
|
},
|
|
"repo_data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/web.Week"
|
|
}
|
|
},
|
|
"user_total": {
|
|
"type": "integer"
|
|
},
|
|
"users_data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/web.ContributorTrend"
|
|
}
|
|
},
|
|
"week_total": {
|
|
"type": "integer"
|
|
},
|
|
"with_line_counts": {
|
|
"description": "是否统计增删的行数, 默认总提交超过 10000 的仓库不统计",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"die.WebError": {
|
|
"type": "object",
|
|
"properties": {
|
|
"errcode": {
|
|
"type": "integer"
|
|
},
|
|
"errmsg": {
|
|
"type": "string"
|
|
},
|
|
"errparam": {
|
|
"type": "object",
|
|
"additionalProperties": {}
|
|
}
|
|
}
|
|
},
|
|
"web.Meta": {
|
|
"type": "object",
|
|
"properties": {
|
|
"gen_branch": {
|
|
"type": "string"
|
|
},
|
|
"gen_hash": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |