代码拉取完成,页面将自动刷新
All URIs are relative to https://gitee.com/api/v5
Method | HTTP request | Description |
---|---|---|
getReposOwnerRepoGitBlobsSha | GET /repos/{owner}/{repo}/git/blobs/{sha} | 获取文件Blob |
getReposOwnerRepoGitGiteeMetrics | GET /repos/{owner}/{repo}/git/gitee_metrics | 获取 Gitee 指数 |
getReposOwnerRepoGitTreesSha | GET /repos/{owner}/{repo}/git/trees/{sha} | 获取目录Tree |
Blob getReposOwnerRepoGitBlobsSha(owner, repo, sha)
获取文件Blob
获取文件Blob
// Import classes:
//import com.gitee.sdk.gitee5j.ApiClient;
//import com.gitee.sdk.gitee5j.ApiException;
//import com.gitee.sdk.gitee5j.Configuration;
//import com.gitee.sdk.gitee5j.auth.*;
//import com.gitee.sdk.gitee5j.api.GitDataApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
GitDataApi apiInstance = new GitDataApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String sha = "sha_example"; // String | 文件的 Blob SHA,可通过 [获取仓库具体路径下的内容] API 获取
try {
Blob result = apiInstance.getReposOwnerRepoGitBlobsSha(owner, repo, sha);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling GitDataApi#getReposOwnerRepoGitBlobsSha");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
owner | String | 仓库所属空间地址(企业、组织或个人的地址path) | |
repo | String | 仓库路径(path) | |
sha | String | 文件的 Blob SHA,可通过 [获取仓库具体路径下的内容] API 获取 |
GiteeMetrics getReposOwnerRepoGitGiteeMetrics(owner, repo)
获取 Gitee 指数
获取 Gitee 指数
// Import classes:
//import com.gitee.sdk.gitee5j.ApiClient;
//import com.gitee.sdk.gitee5j.ApiException;
//import com.gitee.sdk.gitee5j.Configuration;
//import com.gitee.sdk.gitee5j.auth.*;
//import com.gitee.sdk.gitee5j.api.GitDataApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
GitDataApi apiInstance = new GitDataApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
try {
GiteeMetrics result = apiInstance.getReposOwnerRepoGitGiteeMetrics(owner, repo);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling GitDataApi#getReposOwnerRepoGitGiteeMetrics");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
owner | String | 仓库所属空间地址(企业、组织或个人的地址path) | |
repo | String | 仓库路径(path) |
Tree getReposOwnerRepoGitTreesSha(owner, repo, sha, recursive)
获取目录Tree
获取目录Tree
// Import classes:
//import com.gitee.sdk.gitee5j.ApiClient;
//import com.gitee.sdk.gitee5j.ApiException;
//import com.gitee.sdk.gitee5j.Configuration;
//import com.gitee.sdk.gitee5j.auth.*;
//import com.gitee.sdk.gitee5j.api.GitDataApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
GitDataApi apiInstance = new GitDataApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String sha = "sha_example"; // String | 可以是分支名(如master)、Commit或者目录Tree的SHA值
Integer recursive = 56; // Integer | 赋值为1递归获取目录
try {
Tree result = apiInstance.getReposOwnerRepoGitTreesSha(owner, repo, sha, recursive);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling GitDataApi#getReposOwnerRepoGitTreesSha");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
owner | String | 仓库所属空间地址(企业、组织或个人的地址path) | |
repo | String | 仓库路径(path) | |
sha | String | 可以是分支名(如master)、Commit或者目录Tree的SHA值 | |
recursive | Integer | 赋值为1递归获取目录 | [optional] |
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。