API 参考读取 API

仓库档案

单个仓库的档案,加上最近一期的日 / 周 / 月统计。

GET/api/v1/repos/{id}
GET
/api/v1/repos/{id}

单个仓库的档案,加上最近一期的日 / 周 / 月统计。最近一期取的是已经存下来的最后一期,不是昨天:采集任务随时可能停,按日历今天取会返回一串空洞,而空洞在图上和「这几天真的没人 star」无法区分(§4.1)。

可见性与列表一致:公开可见,或这把 key 自己提交的。

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

id*string

repos.id(nanoid),或 owner/name——后者要 URL 编码成 owner%2Fname

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/repos/string"
{  "repo": {    "id": "string",    "fullName": "string",    "description": "string",    "repoUrl": "string",    "topics": [      "string"    ],    "languages": [      "string"    ],    "licenseSpdxId": "string",    "stars": 0,    "forks": 0,    "subscribersCount": 0,    "openIssuesCount": 0,    "defaultBranch": "string",    "archived": true,    "createdAt": "2019-08-24T14:15:22Z",    "pushedAt": "2019-08-24T14:15:22Z",    "lastCommit": "2019-08-24T14:15:22Z",    "classification": {      "projectTypes": [        "client"      ],      "categoryCode": "string",      "categoryReviewed": true,      "isPlatformProject": true,      "platformStatus": "pending",      "tags": [        "string"      ]    },    "projectCount": 0,    "owner": "string",    "ownerId": 0,    "name": "string",    "homepage": "string",    "contributorCount": 0,    "commitCount": 0,    "mentionableUsersCount": 0,    "pullRequestsCount": 0,    "releasesCount": 0,    "latestReleaseName": "string",    "latestReleaseTagName": "string",    "latestReleasePublishedAt": "2019-08-24T14:15:22Z",    "latestReleaseUrl": "string",    "openGraphImageUrl": "string",    "iconUrl": "string"  },  "latestStats": {    "daily": {      "period": "2019-08-24T14:15:22Z",      "date": "string",      "yearWeek": "string",      "yearMonth": "string",      "totalStars": 0,      "deltaStars": 0,      "deltaNewStars": 0,      "totalWatchers": 0,      "deltaWatchers": 0,      "totalForks": 0,      "deltaForks": 0,      "totalOpenIssues": 0,      "deltaOpenIssues": 0,      "totalPullRequests": 0,      "deltaPullRequests": 0,      "totalReleases": 0,      "deltaReleases": 0,      "totalContributors": 0,      "deltaContributors": 0,      "totalCommits": 0,      "deltaCommits": 0,      "totalDownloads": 0,      "deltaDownloads": 0    },    "weekly": {      "period": "2019-08-24T14:15:22Z",      "date": "string",      "yearWeek": "string",      "yearMonth": "string",      "totalStars": 0,      "deltaStars": 0,      "deltaNewStars": 0,      "totalWatchers": 0,      "deltaWatchers": 0,      "totalForks": 0,      "deltaForks": 0,      "totalOpenIssues": 0,      "deltaOpenIssues": 0,      "totalPullRequests": 0,      "deltaPullRequests": 0,      "totalReleases": 0,      "deltaReleases": 0,      "totalContributors": 0,      "deltaContributors": 0,      "totalCommits": 0,      "deltaCommits": 0,      "totalDownloads": 0,      "deltaDownloads": 0    },    "monthly": {      "period": "2019-08-24T14:15:22Z",      "date": "string",      "yearWeek": "string",      "yearMonth": "string",      "totalStars": 0,      "deltaStars": 0,      "deltaNewStars": 0,      "totalWatchers": 0,      "deltaWatchers": 0,      "totalForks": 0,      "deltaForks": 0,      "totalOpenIssues": 0,      "deltaOpenIssues": 0,      "totalPullRequests": 0,      "deltaPullRequests": 0,      "totalReleases": 0,      "deltaReleases": 0,      "totalContributors": 0,      "deltaContributors": 0,      "totalCommits": 0,      "deltaCommits": 0,      "totalDownloads": 0,      "deltaDownloads": 0    }  }}