1 Star 6 Fork 3

SDK For Gitee/gitee5j

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
docs
ActivityApi.md
AttachFile.md
Blame.md
Blob.md
Branch.md
BranchCommit.md
Code.md
CodeComment.md
CodeFile.md
CodeForks.md
CodeForksHistory.md
CollaboratorsUsernameBody.md
CommentBody.md
Commit.md
CommitContent.md
CommitParentsBasic.md
CommitStats.md
Compare.md
CompleteBranch.md
Content.md
ContentBasic.md
ContentsPathBody.md
ContentsPathBody1.md
ContentsPathBody2.md
Contributor.md
DiffFile.md
EmailsApi.md
EnterpriseBasic.md
EnterpriseMember.md
EnterpriseMembersBody.md
EnterpriseReposBody.md
EnterpriseWeekReportBody.md
EnterprisesApi.md
Event.md
GistIdCommentsBody.md
GistsApi.md
GistsBody.md
GistsIdBody.md
GitAction.md
GitCommit.md
GitDataApi.md
GitSha.md
GitUser.md
GitUserBasic.md
GiteeMetricData.md
GiteeMetrics.md
Group.md
GroupBasic.md
GroupDetail.md
GroupFollowers.md
GroupMember.md
Hook.md
HooksIdBody.md
Href.md
IdCommentBody.md
Issue.md
IssueState.md
IssueType.md
IssuesApi.md
IssuesNumberBody.md
IssuesNumberBody1.md
Label.md
LabelsApi.md
LabelsOriginalNameBody.md
Link.md
MarkdownBody.md
MembersUsernameBody.md
MembershipsUsernameBody.md
Milestone.md
MilestonesApi.md
MilestonesNumberBody.md
MiscellaneousApi.md
Namespace.md
NamespaceMini.md
Note.md
NotificationsMessagesBody.md
NotificationsMessagesBody1.md
NotificationsThreadsBody.md
NumberAssigneesBody.md
NumberAssigneesBody1.md
NumberCommentsBody.md
NumberCommentsBody1.md
NumberMergeBody.md
NumberReviewBody.md
NumberTestBody.md
NumberTestersBody.md
NumberTestersBody1.md
OperateLog.md
OrgReposBody.md
OrganizationsApi.md
OrgsOrgBody.md
OrgsOrgBody1.md
OwnerIssuesBody.md
OwnerRepoBody.md
OwnerRepoBody1.md
Patch.md
ProgramBasic.md
Project.md
ProjectBasic.md
ProjectLabel.md
ProjectMember.md
ProjectMemberPermission.md
ProjectMini.md
ProjectPermission.md
ProjectPushConfig.md
ProjectStargazers.md
ProjectTrafficData.md
ProjectTrafficDataDesc.md
ProjectTrafficDataSummary.md
ProjectWatchers.md
ProtectionRule.md
PullRequest.md
PullRequestBranch.md
PullRequestComments.md
PullRequestCommits.md
PullRequestFiles.md
PullRequestLinks.md
PullRequestsApi.md
PullsNumberBody.md
RefPullRequest.md
Release.md
ReleaseAsset.md
ReleaseIdAttachFilesBody.md
ReleasesIdBody.md
RepoBaiduStatisticKeyBody.md
RepoBranchesBody.md
RepoCommit.md
RepoCommitWithFiles.md
RepoCommitsBody.md
RepoForksBody.md
RepoHooksBody.md
RepoKeysBody.md
RepoLabelsBody.md
RepoMilestonesBody.md
RepoNotificationsBody.md
RepoPagesBody.md
RepoPullsBody.md
RepoPushConfigBody.md
RepoReleasesBody.md
RepoReviewerBody.md
RepoTagsBody.md
RepoTrafficdataBody.md
RepositoriesApi.md
SSHKey.md
SSHKeyBasic.md
SearchApi.md
SettingNewBody.md
ShaCommentsBody.md
Tag.md
TagCommit.md
Tree.md
TreeEntry.md
User.md
UserAssignee.md
UserBasic.md
UserBody.md
UserDetail.md
UserEmail.md
UserInfo.md
UserKeysBody.md
UserMessage.md
UserMessageList.md
UserMini.md
UserNotification.md
UserNotificationCount.md
UserNotificationList.md
UserNotificationNamespace.md
UserNotificationSubject.md
UserReposBody.md
UsersApi.md
UsersOrganizationBody.md
WebhooksApi.md
WeekReport.md
WeekReportIdBody.md
WildcardSettingBody.md
scripts
src
.gitignore
LICENSE
README.md
pom.xml
克隆/下载
RepositoriesApi.md 155.98 KB
一键复制 编辑 原始数据 按行查看 历史

RepositoriesApi

All URIs are relative to https://gitee.com/api/v5

Method HTTP request Description
deleteReposOwnerRepo DELETE /repos/{owner}/{repo} 删除一个仓库
deleteReposOwnerRepoBaiduStatisticKey DELETE /repos/{owner}/{repo}/baidu_statistic_key 删除仓库的百度统计 key
deleteReposOwnerRepoBranchesBranchProtection DELETE /repos/{owner}/{repo}/branches/{branch}/protection 取消保护分支的设置
deleteReposOwnerRepoBranchesWildcardSetting DELETE /repos/{owner}/{repo}/branches/{wildcard}/setting 删除保护分支规则
deleteReposOwnerRepoCollaboratorsUsername DELETE /repos/{owner}/{repo}/collaborators/{username} 移除仓库成员
deleteReposOwnerRepoCommentsId DELETE /repos/{owner}/{repo}/comments/{id} 删除Commit评论
deleteReposOwnerRepoContentsPath DELETE /repos/{owner}/{repo}/contents/{path} 删除文件
deleteReposOwnerRepoKeysEnableId DELETE /repos/{owner}/{repo}/keys/enable/{id} 停用仓库公钥
deleteReposOwnerRepoKeysId DELETE /repos/{owner}/{repo}/keys/{id} 删除一个仓库公钥
deleteReposOwnerRepoReleasesId DELETE /repos/{owner}/{repo}/releases/{id} 删除仓库Release
deleteReposOwnerRepoReleasesReleaseIdAttachFilesAttachFileId DELETE /repos/{owner}/{repo}/releases/{release_id}/attach_files/{attach_file_id} 删除仓库下指定 Release 的指定附件
getEnterprisesEnterpriseRepos GET /enterprises/{enterprise}/repos 获取企业的所有仓库
getOrgsOrgRepos GET /orgs/{org}/repos 获取一个组织的仓库
getReposOwnerRepo GET /repos/{owner}/{repo} 获取用户的某个仓库
getReposOwnerRepoBaiduStatisticKey GET /repos/{owner}/{repo}/baidu_statistic_key 获取仓库的百度统计 key
getReposOwnerRepoBlamePath GET /repos/{owner}/{repo}/blame/{path} Blame
getReposOwnerRepoBranches GET /repos/{owner}/{repo}/branches 获取所有分支
getReposOwnerRepoBranchesBranch GET /repos/{owner}/{repo}/branches/{branch} 获取单个分支
getReposOwnerRepoCollaborators GET /repos/{owner}/{repo}/collaborators 获取仓库的所有成员
getReposOwnerRepoCollaboratorsUsername GET /repos/{owner}/{repo}/collaborators/{username} 判断用户是否为仓库成员
getReposOwnerRepoCollaboratorsUsernamePermission GET /repos/{owner}/{repo}/collaborators/{username}/permission 查看仓库成员的权限
getReposOwnerRepoComments GET /repos/{owner}/{repo}/comments 获取仓库的 Commit 评论
getReposOwnerRepoCommentsId GET /repos/{owner}/{repo}/comments/{id} 获取仓库的某条Commit评论
getReposOwnerRepoCommits GET /repos/{owner}/{repo}/commits 仓库的所有提交
getReposOwnerRepoCommitsRefComments GET /repos/{owner}/{repo}/commits/{ref}/comments 获取单个Commit的评论
getReposOwnerRepoCommitsSha GET /repos/{owner}/{repo}/commits/{sha} 仓库的某个提交
getReposOwnerRepoCompareBaseHead GET /repos/{owner}/{repo}/compare/{base}...{head} Commits 对比
getReposOwnerRepoContentsPath GET /repos/{owner}/{repo}/contents/{path} 获取仓库具体路径下的内容
getReposOwnerRepoContributors GET /repos/{owner}/{repo}/contributors 获取仓库贡献者
getReposOwnerRepoForks GET /repos/{owner}/{repo}/forks 查看仓库的Forks
getReposOwnerRepoKeys GET /repos/{owner}/{repo}/keys 获取仓库已部署的公钥
getReposOwnerRepoKeysAvailable GET /repos/{owner}/{repo}/keys/available 获取仓库可部署的公钥
getReposOwnerRepoKeysId GET /repos/{owner}/{repo}/keys/{id} 获取仓库的单个公钥
getReposOwnerRepoPages GET /repos/{owner}/{repo}/pages 获取Pages信息
getReposOwnerRepoPushConfig GET /repos/{owner}/{repo}/push_config 获取仓库推送规则设置
getReposOwnerRepoRawPath GET /repos/{owner}/{repo}/raw/{path} 获取 raw 文件(100MB 以内)
getReposOwnerRepoReadme GET /repos/{owner}/{repo}/readme 获取仓库README
getReposOwnerRepoReleases GET /repos/{owner}/{repo}/releases 获取仓库的所有Releases
getReposOwnerRepoReleasesId GET /repos/{owner}/{repo}/releases/{id} 获取仓库的单个Releases
getReposOwnerRepoReleasesLatest GET /repos/{owner}/{repo}/releases/latest 获取仓库的最后更新的Release
getReposOwnerRepoReleasesReleaseIdAttachFiles GET /repos/{owner}/{repo}/releases/{release_id}/attach_files 获取仓库下的指定 Release 的所有附件
getReposOwnerRepoReleasesReleaseIdAttachFilesAttachFileId GET /repos/{owner}/{repo}/releases/{release_id}/attach_files/{attach_file_id} 获取仓库下指定 Release 的单个附件
getReposOwnerRepoReleasesReleaseIdAttachFilesAttachFileIdDownload GET /repos/{owner}/{repo}/releases/{release_id}/attach_files/{attach_file_id}/download 下载指定 Release 的单个附件
getReposOwnerRepoReleasesTagsTag GET /repos/{owner}/{repo}/releases/tags/{tag} 根据Tag名称获取仓库的Release
getReposOwnerRepoTags GET /repos/{owner}/{repo}/tags 列出仓库所有的 tags
getReposOwnerRepoTarball GET /repos/{owner}/{repo}/tarball 下载仓库 tar.gz
getReposOwnerRepoZipball GET /repos/{owner}/{repo}/zipball 下载仓库 zip
getUserRepos GET /user/repos 列出授权用户的所有仓库
getUsersUsernameRepos GET /users/{username}/repos 获取某个用户的公开仓库
patchReposOwnerRepo PATCH /repos/{owner}/{repo} 更新仓库设置
patchReposOwnerRepoCommentsId PATCH /repos/{owner}/{repo}/comments/{id} 更新Commit评论
patchReposOwnerRepoReleasesId PATCH /repos/{owner}/{repo}/releases/{id} 更新仓库Release
postEnterprisesEnterpriseRepos POST /enterprises/{enterprise}/repos 创建企业仓库
postOrgsOrgRepos POST /orgs/{org}/repos 创建组织仓库
postReposOwnerRepoBaiduStatisticKey POST /repos/{owner}/{repo}/baidu_statistic_key 设置/更新仓库的百度统计 key
postReposOwnerRepoBranches POST /repos/{owner}/{repo}/branches 创建分支
postReposOwnerRepoCommits POST /repos/{owner}/{repo}/commits 提交多个文件变更
postReposOwnerRepoCommitsShaComments POST /repos/{owner}/{repo}/commits/{sha}/comments 创建Commit评论
postReposOwnerRepoContentsPath POST /repos/{owner}/{repo}/contents/{path} 新建文件
postReposOwnerRepoForks POST /repos/{owner}/{repo}/forks Fork一个仓库
postReposOwnerRepoKeys POST /repos/{owner}/{repo}/keys 为仓库添加公钥
postReposOwnerRepoOpen POST /repos/{owner}/{repo}/open 开通Gitee Go
postReposOwnerRepoPagesBuilds POST /repos/{owner}/{repo}/pages/builds 请求建立Pages
postReposOwnerRepoReleases POST /repos/{owner}/{repo}/releases 创建仓库Release
postReposOwnerRepoReleasesReleaseIdAttachFiles POST /repos/{owner}/{repo}/releases/{release_id}/attach_files 上传附件到仓库指定 Release
postReposOwnerRepoTags POST /repos/{owner}/{repo}/tags 创建一个仓库的 Tag
postReposOwnerRepoTrafficData POST /repos/{owner}/{repo}/traffic-data 获取最近30天的七日以内访问量
postUserRepos POST /user/repos 创建一个仓库
putReposOwnerRepoBranchesBranchProtection PUT /repos/{owner}/{repo}/branches/{branch}/protection 设置分支保护
putReposOwnerRepoBranchesSettingNew PUT /repos/{owner}/{repo}/branches/setting/new 新建保护分支规则
putReposOwnerRepoBranchesWildcardSetting PUT /repos/{owner}/{repo}/branches/{wildcard}/setting 更新保护分支规则
putReposOwnerRepoClear PUT /repos/{owner}/{repo}/clear 清空一个仓库
putReposOwnerRepoCollaboratorsUsername PUT /repos/{owner}/{repo}/collaborators/{username} 添加仓库成员或更新仓库成员权限
putReposOwnerRepoContentsPath PUT /repos/{owner}/{repo}/contents/{path} 更新文件
putReposOwnerRepoKeysEnableId PUT /repos/{owner}/{repo}/keys/enable/{id} 启用仓库公钥
putReposOwnerRepoPages PUT /repos/{owner}/{repo}/pages 上传设置 Pages SSL 证书和域名
putReposOwnerRepoPushConfig PUT /repos/{owner}/{repo}/push_config 修改仓库推送规则设置
putReposOwnerRepoReviewer PUT /repos/{owner}/{repo}/reviewer 修改代码审查设置

deleteReposOwnerRepo

deleteReposOwnerRepo(owner, repo)

删除一个仓库

删除一个仓库

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
try {
    apiInstance.deleteReposOwnerRepo(owner, repo);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#deleteReposOwnerRepo");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)

Return type

null (empty response body)

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

deleteReposOwnerRepoBaiduStatisticKey

deleteReposOwnerRepoBaiduStatisticKey(owner, repo)

删除仓库的百度统计 key

删除仓库的百度统计 key

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
try {
    apiInstance.deleteReposOwnerRepoBaiduStatisticKey(owner, repo);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#deleteReposOwnerRepoBaiduStatisticKey");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)

Return type

null (empty response body)

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

deleteReposOwnerRepoBranchesBranchProtection

deleteReposOwnerRepoBranchesBranchProtection(owner, repo, branch)

取消保护分支的设置

取消保护分支的设置

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String branch = "branch_example"; // String | 分支名称
try {
    apiInstance.deleteReposOwnerRepoBranchesBranchProtection(owner, repo, branch);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#deleteReposOwnerRepoBranchesBranchProtection");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
branch String 分支名称

Return type

null (empty response body)

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

deleteReposOwnerRepoBranchesWildcardSetting

ProtectionRule deleteReposOwnerRepoBranchesWildcardSetting(owner, repo, wildcard)

删除保护分支规则

删除保护分支规则

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String wildcard = "wildcard_example"; // String | 分支/通配符
try {
    ProtectionRule result = apiInstance.deleteReposOwnerRepoBranchesWildcardSetting(owner, repo, wildcard);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#deleteReposOwnerRepoBranchesWildcardSetting");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
wildcard String 分支/通配符

Return type

ProtectionRule

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

deleteReposOwnerRepoCollaboratorsUsername

deleteReposOwnerRepoCollaboratorsUsername(owner, repo, username)

移除仓库成员

移除仓库成员

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String username = "username_example"; // String | 用户名(username/login)
try {
    apiInstance.deleteReposOwnerRepoCollaboratorsUsername(owner, repo, username);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#deleteReposOwnerRepoCollaboratorsUsername");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
username String 用户名(username/login)

Return type

null (empty response body)

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

deleteReposOwnerRepoCommentsId

deleteReposOwnerRepoCommentsId(owner, repo, id)

删除Commit评论

删除Commit评论

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
Integer id = 56; // Integer | 评论的ID
try {
    apiInstance.deleteReposOwnerRepoCommentsId(owner, repo, id);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#deleteReposOwnerRepoCommentsId");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
id Integer 评论的ID

Return type

null (empty response body)

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

deleteReposOwnerRepoContentsPath

CommitContent deleteReposOwnerRepoContentsPath(owner, repo, path, body)

删除文件

删除文件

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String path = "path_example"; // String | 文件的路径
ContentsPathBody2 body = new ContentsPathBody2(); // ContentsPathBody2 | 
try {
    CommitContent result = apiInstance.deleteReposOwnerRepoContentsPath(owner, repo, path, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#deleteReposOwnerRepoContentsPath");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
path String 文件的路径
body ContentsPathBody2 [optional]

Return type

CommitContent

Authorization

OAuth2

HTTP request headers

  • Content-Type: /
  • Accept: application/json

deleteReposOwnerRepoKeysEnableId

deleteReposOwnerRepoKeysEnableId(owner, repo, id)

停用仓库公钥

停用仓库公钥

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
Integer id = 56; // Integer | 公钥 ID
try {
    apiInstance.deleteReposOwnerRepoKeysEnableId(owner, repo, id);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#deleteReposOwnerRepoKeysEnableId");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
id Integer 公钥 ID

Return type

null (empty response body)

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

deleteReposOwnerRepoKeysId

deleteReposOwnerRepoKeysId(owner, repo, id)

删除一个仓库公钥

删除一个仓库公钥

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
Integer id = 56; // Integer | 公钥 ID
try {
    apiInstance.deleteReposOwnerRepoKeysId(owner, repo, id);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#deleteReposOwnerRepoKeysId");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
id Integer 公钥 ID

Return type

null (empty response body)

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

deleteReposOwnerRepoReleasesId

deleteReposOwnerRepoReleasesId(owner, repo, id)

删除仓库Release

删除仓库Release

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
Integer id = 56; // Integer | 
try {
    apiInstance.deleteReposOwnerRepoReleasesId(owner, repo, id);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#deleteReposOwnerRepoReleasesId");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
id Integer

Return type

null (empty response body)

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

deleteReposOwnerRepoReleasesReleaseIdAttachFilesAttachFileId

deleteReposOwnerRepoReleasesReleaseIdAttachFilesAttachFileId(owner, repo, releaseId, attachFileId)

删除仓库下指定 Release 的指定附件

删除仓库下指定 Release 的指定附件

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
Integer releaseId = 56; // Integer | 
Integer attachFileId = 56; // Integer | 
try {
    apiInstance.deleteReposOwnerRepoReleasesReleaseIdAttachFilesAttachFileId(owner, repo, releaseId, attachFileId);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#deleteReposOwnerRepoReleasesReleaseIdAttachFilesAttachFileId");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
releaseId Integer
attachFileId Integer

Return type

null (empty response body)

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getEnterprisesEnterpriseRepos

List<Project> getEnterprisesEnterpriseRepos(enterprise, search, type, direct, page, perPage)

获取企业的所有仓库

获取企业的所有仓库

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String enterprise = "enterprise_example"; // String | 企业的路径(path/login)
String search = "search_example"; // String | 搜索字符串
String type = "all"; // String | 筛选仓库的类型,可以是 all, public, internal, private。默认: all
Boolean direct = true; // Boolean | 只获取直属仓库,默认: false
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量,最大为 100
try {
    List<Project> result = apiInstance.getEnterprisesEnterpriseRepos(enterprise, search, type, direct, page, perPage);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getEnterprisesEnterpriseRepos");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
enterprise String 企业的路径(path/login)
search String 搜索字符串 [optional]
type String 筛选仓库的类型,可以是 all, public, internal, private。默认: all [optional] [default to all] [enum: all, public, internal, private]
direct Boolean 只获取直属仓库,默认: false [optional]
page Integer 当前的页码 [optional] [default to 1]
perPage Integer 每页的数量,最大为 100 [optional] [default to 20] [enum: 1, 100]

Return type

List<Project>

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getOrgsOrgRepos

List<Project> getOrgsOrgRepos(org, type, page, perPage)

获取一个组织的仓库

获取一个组织的仓库

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String org = "org_example"; // String | 组织的路径(path/login)
String type = "all"; // String | 筛选仓库的类型,可以是 all, public, private。默认: all
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量,最大为 100
try {
    List<Project> result = apiInstance.getOrgsOrgRepos(org, type, page, perPage);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getOrgsOrgRepos");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
org String 组织的路径(path/login)
type String 筛选仓库的类型,可以是 all, public, private。默认: all [optional] [default to all] [enum: all, public, private]
page Integer 当前的页码 [optional] [default to 1]
perPage Integer 每页的数量,最大为 100 [optional] [default to 20] [enum: 1, 100]

Return type

List<Project>

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepo

Project getReposOwnerRepo(owner, repo)

获取用户的某个仓库

获取用户的某个仓库

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
try {
    Project result = apiInstance.getReposOwnerRepo(owner, repo);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepo");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)

Return type

Project

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoBaiduStatisticKey

getReposOwnerRepoBaiduStatisticKey(owner, repo)

获取仓库的百度统计 key

获取仓库的百度统计 key

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
try {
    apiInstance.getReposOwnerRepoBaiduStatisticKey(owner, repo);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoBaiduStatisticKey");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)

Return type

null (empty response body)

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getReposOwnerRepoBlamePath

List<Blame> getReposOwnerRepoBlamePath(owner, repo, path, ref)

Blame

Blame

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String path = "path_example"; // String | 文件的路径(1 MB 以内的文件文件)
String ref = "ref_example"; // String | 分支、tag 或 commit。默认: 仓库的默认分支(通常是 master)
try {
    List<Blame> result = apiInstance.getReposOwnerRepoBlamePath(owner, repo, path, ref);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoBlamePath");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
path String 文件的路径(1 MB 以内的文件文件)
ref String 分支、tag 或 commit。默认: 仓库的默认分支(通常是 master) [optional]

Return type

List<Blame>

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoBranches

List<Branch> getReposOwnerRepoBranches(owner, repo, sort, direction, page, perPage)

获取所有分支

获取所有分支

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String sort = "name"; // String | 排序字段
String direction = "asc"; // String | 排序方向
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量,最大为 100
try {
    List<Branch> result = apiInstance.getReposOwnerRepoBranches(owner, repo, sort, direction, page, perPage);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoBranches");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
sort String 排序字段 [optional] [default to name] [enum: name, updated]
direction String 排序方向 [optional] [default to asc] [enum: asc, desc]
page Integer 当前的页码 [optional] [default to 1]
perPage Integer 每页的数量,最大为 100 [optional] [default to 20] [enum: 1, 100]

Return type

List<Branch>

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoBranchesBranch

CompleteBranch getReposOwnerRepoBranchesBranch(owner, repo, branch)

获取单个分支

获取单个分支

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String branch = "branch_example"; // String | 分支名称
try {
    CompleteBranch result = apiInstance.getReposOwnerRepoBranchesBranch(owner, repo, branch);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoBranchesBranch");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
branch String 分支名称

Return type

CompleteBranch

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoCollaborators

List<ProjectMember> getReposOwnerRepoCollaborators(owner, repo, page, perPage)

获取仓库的所有成员

获取仓库的所有成员

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量,最大为 100
try {
    List<ProjectMember> result = apiInstance.getReposOwnerRepoCollaborators(owner, repo, page, perPage);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoCollaborators");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
page Integer 当前的页码 [optional] [default to 1]
perPage Integer 每页的数量,最大为 100 [optional] [default to 20] [enum: 1, 100]

Return type

List<ProjectMember>

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoCollaboratorsUsername

getReposOwnerRepoCollaboratorsUsername(owner, repo, username)

判断用户是否为仓库成员

判断用户是否为仓库成员

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String username = "username_example"; // String | 用户名(username/login)
try {
    apiInstance.getReposOwnerRepoCollaboratorsUsername(owner, repo, username);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoCollaboratorsUsername");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
username String 用户名(username/login)

Return type

null (empty response body)

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getReposOwnerRepoCollaboratorsUsernamePermission

ProjectMemberPermission getReposOwnerRepoCollaboratorsUsernamePermission(owner, repo, username)

查看仓库成员的权限

查看仓库成员的权限

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String username = "username_example"; // String | 用户名(username/login)
try {
    ProjectMemberPermission result = apiInstance.getReposOwnerRepoCollaboratorsUsernamePermission(owner, repo, username);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoCollaboratorsUsernamePermission");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
username String 用户名(username/login)

Return type

ProjectMemberPermission

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoComments

List<Note> getReposOwnerRepoComments(owner, repo, page, perPage, order)

获取仓库的 Commit 评论

获取仓库的 Commit 评论

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量,最大为 100
String order = "asc"; // String | 排序顺序: asc(default),desc
try {
    List<Note> result = apiInstance.getReposOwnerRepoComments(owner, repo, page, perPage, order);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoComments");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
page Integer 当前的页码 [optional] [default to 1]
perPage Integer 每页的数量,最大为 100 [optional] [default to 20] [enum: 1, 100]
order String 排序顺序: asc(default),desc [optional] [default to asc]

Return type

List<Note>

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoCommentsId

Note getReposOwnerRepoCommentsId(owner, repo, id)

获取仓库的某条Commit评论

获取仓库的某条Commit评论

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
Integer id = 56; // Integer | 评论的ID
try {
    Note result = apiInstance.getReposOwnerRepoCommentsId(owner, repo, id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoCommentsId");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
id Integer 评论的ID

Return type

Note

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoCommits

List<RepoCommit> getReposOwnerRepoCommits(owner, repo, sha, path, author, since, until, page, perPage)

仓库的所有提交

仓库的所有提交

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String sha = "sha_example"; // String | 提交起始的SHA值或者分支名. 默认: 仓库的默认分支
String path = "path_example"; // String | 包含该文件的提交
String author = "author_example"; // String | 提交作者的邮箱或个人空间地址(username/login)
String since = "since_example"; // String | 提交的起始时间,时间格式为 ISO 8601
String until = "until_example"; // String | 提交的最后时间,时间格式为 ISO 8601
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量,最大为 100
try {
    List<RepoCommit> result = apiInstance.getReposOwnerRepoCommits(owner, repo, sha, path, author, since, until, page, perPage);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoCommits");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
sha String 提交起始的SHA值或者分支名. 默认: 仓库的默认分支 [optional]
path String 包含该文件的提交 [optional]
author String 提交作者的邮箱或个人空间地址(username/login) [optional]
since String 提交的起始时间,时间格式为 ISO 8601 [optional]
until String 提交的最后时间,时间格式为 ISO 8601 [optional]
page Integer 当前的页码 [optional] [default to 1]
perPage Integer 每页的数量,最大为 100 [optional] [default to 20] [enum: 1, 100]

Return type

List<RepoCommit>

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoCommitsRefComments

List<Note> getReposOwnerRepoCommitsRefComments(owner, repo, ref, page, perPage)

获取单个Commit的评论

获取单个Commit的评论

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String ref = "ref_example"; // String | Commit的Reference
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量,最大为 100
try {
    List<Note> result = apiInstance.getReposOwnerRepoCommitsRefComments(owner, repo, ref, page, perPage);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoCommitsRefComments");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
ref String Commit的Reference
page Integer 当前的页码 [optional] [default to 1]
perPage Integer 每页的数量,最大为 100 [optional] [default to 20] [enum: 1, 100]

Return type

List<Note>

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoCommitsSha

RepoCommitWithFiles getReposOwnerRepoCommitsSha(owner, repo, sha)

仓库的某个提交

仓库的某个提交

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String sha = "sha_example"; // String | 提交的SHA值或者分支名
try {
    RepoCommitWithFiles result = apiInstance.getReposOwnerRepoCommitsSha(owner, repo, sha);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoCommitsSha");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
sha String 提交的SHA值或者分支名

Return type

RepoCommitWithFiles

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoCompareBaseHead

Compare getReposOwnerRepoCompareBaseHead(owner, repo, base, head, straight, suffix)

Commits 对比

Commits 对比 返回的 commits 数量限制在 100 以内

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String base = "base_example"; // String | 对比的起点。Commit SHA、分支名或标签名
String head = "head_example"; // String | 对比的终点。Commit SHA、分支名或标签名
Boolean straight = true; // Boolean | 是否直对比。默认 false
String suffix = "suffix_example"; // String | 按照文件后缀过滤文件,如 `.txt`。只影响 `files`
try {
    Compare result = apiInstance.getReposOwnerRepoCompareBaseHead(owner, repo, base, head, straight, suffix);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoCompareBaseHead");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
base String 对比的起点。Commit SHA、分支名或标签名
head String 对比的终点。Commit SHA、分支名或标签名
straight Boolean 是否直对比。默认 false [optional]
suffix String 按照文件后缀过滤文件,如 `.txt`。只影响 `files` [optional]

Return type

Compare

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoContentsPath

Object getReposOwnerRepoContentsPath(owner, repo, path, ref)

获取仓库具体路径下的内容

获取仓库具体路径下的内容

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String path = "path_example"; // String | 文件的路径
String ref = "ref_example"; // String | 分支、tag或commit。默认: 仓库的默认分支(通常是master)
try {
    Object result = apiInstance.getReposOwnerRepoContentsPath(owner, repo, path, ref);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoContentsPath");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
path String 文件的路径
ref String 分支、tag或commit。默认: 仓库的默认分支(通常是master) [optional]

Return type

Object

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoContributors

List<Contributor> getReposOwnerRepoContributors(owner, repo, type)

获取仓库贡献者

获取仓库贡献者

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String type = "committers"; // String | 贡献者类型
try {
    List<Contributor> result = apiInstance.getReposOwnerRepoContributors(owner, repo, type);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoContributors");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
type String 贡献者类型 [optional] [default to committers] [enum: authors, committers]

Return type

List<Contributor>

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoForks

List<Project> getReposOwnerRepoForks(owner, repo, sort, page, perPage)

查看仓库的Forks

查看仓库的Forks

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String sort = "newest"; // String | 排序方式: fork的时间(newest, oldest),star的人数(stargazers)
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量,最大为 100
try {
    List<Project> result = apiInstance.getReposOwnerRepoForks(owner, repo, sort, page, perPage);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoForks");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
sort String 排序方式: fork的时间(newest, oldest),star的人数(stargazers) [optional] [default to newest] [enum: newest, oldest, stargazers]
page Integer 当前的页码 [optional] [default to 1]
perPage Integer 每页的数量,最大为 100 [optional] [default to 20] [enum: 1, 100]

Return type

List<Project>

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoKeys

List<SSHKey> getReposOwnerRepoKeys(owner, repo, page, perPage)

获取仓库已部署的公钥

获取仓库已部署的公钥

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量,最大为 100
try {
    List<SSHKey> result = apiInstance.getReposOwnerRepoKeys(owner, repo, page, perPage);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoKeys");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
page Integer 当前的页码 [optional] [default to 1]
perPage Integer 每页的数量,最大为 100 [optional] [default to 20] [enum: 1, 100]

Return type

List<SSHKey>

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoKeysAvailable

List<SSHKeyBasic> getReposOwnerRepoKeysAvailable(owner, repo, page, perPage)

获取仓库可部署的公钥

获取仓库可部署的公钥

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量,最大为 100
try {
    List<SSHKeyBasic> result = apiInstance.getReposOwnerRepoKeysAvailable(owner, repo, page, perPage);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoKeysAvailable");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
page Integer 当前的页码 [optional] [default to 1]
perPage Integer 每页的数量,最大为 100 [optional] [default to 20] [enum: 1, 100]

Return type

List<SSHKeyBasic>

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoKeysId

SSHKey getReposOwnerRepoKeysId(owner, repo, id)

获取仓库的单个公钥

获取仓库的单个公钥

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
Integer id = 56; // Integer | 公钥 ID
try {
    SSHKey result = apiInstance.getReposOwnerRepoKeysId(owner, repo, id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoKeysId");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
id Integer 公钥 ID

Return type

SSHKey

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoPages

getReposOwnerRepoPages(owner, repo)

获取Pages信息

获取Pages信息

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
try {
    apiInstance.getReposOwnerRepoPages(owner, repo);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoPages");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)

Return type

null (empty response body)

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getReposOwnerRepoPushConfig

ProjectPushConfig getReposOwnerRepoPushConfig(owner, repo)

获取仓库推送规则设置

获取仓库推送规则设置

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
try {
    ProjectPushConfig result = apiInstance.getReposOwnerRepoPushConfig(owner, repo);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoPushConfig");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)

Return type

ProjectPushConfig

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoRawPath

File getReposOwnerRepoRawPath(owner, repo, path, ref)

获取 raw 文件(100MB 以内)

获取 raw 文件(100MB 以内)

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String path = "path_example"; // String | 文件的路径
String ref = "ref_example"; // String | 分支、tag 或 commit。默认: 仓库的默认分支(通常是 master)
try {
    File result = apiInstance.getReposOwnerRepoRawPath(owner, repo, path, ref);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoRawPath");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
path String 文件的路径
ref String 分支、tag 或 commit。默认: 仓库的默认分支(通常是 master) [optional]

Return type

File

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/octet-stream

getReposOwnerRepoReadme

Content getReposOwnerRepoReadme(owner, repo, ref)

获取仓库README

获取仓库README

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String ref = "ref_example"; // String | 分支、tag或commit。默认: 仓库的默认分支(通常是master)
try {
    Content result = apiInstance.getReposOwnerRepoReadme(owner, repo, ref);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoReadme");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
ref String 分支、tag或commit。默认: 仓库的默认分支(通常是master) [optional]

Return type

Content

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoReleases

List<Release> getReposOwnerRepoReleases(owner, repo, page, perPage, direction)

获取仓库的所有Releases

获取仓库的所有Releases

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量,最大为 100
String direction = "direction_example"; // String | 可选。升序/降序。不填为升序
try {
    List<Release> result = apiInstance.getReposOwnerRepoReleases(owner, repo, page, perPage, direction);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoReleases");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
page Integer 当前的页码 [optional] [default to 1]
perPage Integer 每页的数量,最大为 100 [optional] [default to 20] [enum: 1, 100]
direction String 可选。升序/降序。不填为升序 [optional] [enum: asc, desc]

Return type

List<Release>

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoReleasesId

Release getReposOwnerRepoReleasesId(owner, repo, id)

获取仓库的单个Releases

获取仓库的单个Releases

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
Integer id = 56; // Integer | 发行版本的ID
try {
    Release result = apiInstance.getReposOwnerRepoReleasesId(owner, repo, id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoReleasesId");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
id Integer 发行版本的ID

Return type

Release

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoReleasesLatest

Release getReposOwnerRepoReleasesLatest(owner, repo)

获取仓库的最后更新的Release

获取仓库的最后更新的Release

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
try {
    Release result = apiInstance.getReposOwnerRepoReleasesLatest(owner, repo);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoReleasesLatest");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)

Return type

Release

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoReleasesReleaseIdAttachFiles

List<AttachFile> getReposOwnerRepoReleasesReleaseIdAttachFiles(owner, repo, releaseId, page, perPage, direction)

获取仓库下的指定 Release 的所有附件

获取仓库下的指定 Release 的所有附件

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
Integer releaseId = 56; // Integer | 发行版本的ID
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量,最大为 100
String direction = "direction_example"; // String | 可选: 升序/降序,默认为升序
try {
    List<AttachFile> result = apiInstance.getReposOwnerRepoReleasesReleaseIdAttachFiles(owner, repo, releaseId, page, perPage, direction);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoReleasesReleaseIdAttachFiles");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
releaseId Integer 发行版本的ID
page Integer 当前的页码 [optional] [default to 1]
perPage Integer 每页的数量,最大为 100 [optional] [default to 20] [enum: 1, 100]
direction String 可选: 升序/降序,默认为升序 [optional] [enum: asc, desc]

Return type

List<AttachFile>

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoReleasesReleaseIdAttachFilesAttachFileId

AttachFile getReposOwnerRepoReleasesReleaseIdAttachFilesAttachFileId(owner, repo, releaseId, attachFileId)

获取仓库下指定 Release 的单个附件

获取仓库下指定 Release 的单个附件

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
Integer releaseId = 56; // Integer | 发行版本的ID
Integer attachFileId = 56; // Integer | 发行版本下的附件ID
try {
    AttachFile result = apiInstance.getReposOwnerRepoReleasesReleaseIdAttachFilesAttachFileId(owner, repo, releaseId, attachFileId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoReleasesReleaseIdAttachFilesAttachFileId");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
releaseId Integer 发行版本的ID
attachFileId Integer 发行版本下的附件ID

Return type

AttachFile

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoReleasesReleaseIdAttachFilesAttachFileIdDownload

File getReposOwnerRepoReleasesReleaseIdAttachFilesAttachFileIdDownload(owner, repo, releaseId, attachFileId)

下载指定 Release 的单个附件

下载指定 Release 的单个附件

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
Integer releaseId = 56; // Integer | 发行版本的ID
Integer attachFileId = 56; // Integer | 发行版本下的附件ID
try {
    File result = apiInstance.getReposOwnerRepoReleasesReleaseIdAttachFilesAttachFileIdDownload(owner, repo, releaseId, attachFileId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoReleasesReleaseIdAttachFilesAttachFileIdDownload");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
releaseId Integer 发行版本的ID
attachFileId Integer 发行版本下的附件ID

Return type

File

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/octet-stream

getReposOwnerRepoReleasesTagsTag

Release getReposOwnerRepoReleasesTagsTag(owner, repo, tag)

根据Tag名称获取仓库的Release

根据Tag名称获取仓库的Release

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String tag = "tag_example"; // String | Tag 名称
try {
    Release result = apiInstance.getReposOwnerRepoReleasesTagsTag(owner, repo, tag);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoReleasesTagsTag");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
tag String Tag 名称

Return type

Release

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoTags

List<Tag> getReposOwnerRepoTags(owner, repo, sort, direction, page, perPage)

列出仓库所有的 tags

列出仓库所有的 tags

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String sort = "name"; // String | 排序字段
String direction = "asc"; // String | 排序方向
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量,最大为 100
try {
    List<Tag> result = apiInstance.getReposOwnerRepoTags(owner, repo, sort, direction, page, perPage);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoTags");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
sort String 排序字段 [optional] [default to name] [enum: name, updated]
direction String 排序方向 [optional] [default to asc] [enum: asc, desc]
page Integer 当前的页码 [optional] [default to 1]
perPage Integer 每页的数量,最大为 100 [optional] [default to 20] [enum: 1, 100]

Return type

List<Tag>

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getReposOwnerRepoTarball

File getReposOwnerRepoTarball(owner, repo, ref)

下载仓库 tar.gz

下载仓库 tar.gz

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String ref = "ref_example"; // String | 分支、tag或commit。默认: 仓库的默认分支(通常是master)
try {
    File result = apiInstance.getReposOwnerRepoTarball(owner, repo, ref);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoTarball");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
ref String 分支、tag或commit。默认: 仓库的默认分支(通常是master) [optional]

Return type

File

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/gzip

getReposOwnerRepoZipball

File getReposOwnerRepoZipball(owner, repo, ref)

下载仓库 zip

下载仓库 zip

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String ref = "ref_example"; // String | 分支、tag或commit。默认: 仓库的默认分支(通常是master)
try {
    File result = apiInstance.getReposOwnerRepoZipball(owner, repo, ref);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getReposOwnerRepoZipball");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
ref String 分支、tag或commit。默认: 仓库的默认分支(通常是master) [optional]

Return type

File

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/zip

getUserRepos

List<Project> getUserRepos(visibility, affiliation, type, sort, direction, q, page, perPage)

列出授权用户的所有仓库

列出授权用户的所有仓库

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String visibility = "visibility_example"; // String | 公开(public)、私有(private)或者所有(all),默认: 所有(all)
String affiliation = "affiliation_example"; // String | owner(授权用户拥有的仓库)、collaborator(授权用户为仓库成员)、organization_member(授权用户为仓库所在组织并有访问仓库权限)、enterprise_member(授权用户所在企业并有访问仓库权限)、admin(所有有权限的,包括所管理的组织中所有仓库、所管理的企业的所有仓库)。                    可以用逗号分隔符组合。如: owner, organization_member 或 owner, collaborator, organization_member
String type = "type_example"; // String | 筛选用户仓库: 其创建(owner)、个人(personal)、其为成员(member)、公开(public)、私有(private),不能与 visibility 或 affiliation 参数一并使用,否则会报 422 错误
String sort = "full_name"; // String | 排序方式: 创建时间(created),更新时间(updated),最后推送时间(pushed),仓库所属与名称(full_name)。默认: full_name
String direction = "direction_example"; // String | 如果sort参数为full_name,用升序(asc)。否则降序(desc)
String q = "q_example"; // String | 搜索关键字
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量,最大为 100
try {
    List<Project> result = apiInstance.getUserRepos(visibility, affiliation, type, sort, direction, q, page, perPage);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getUserRepos");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
visibility String 公开(public)、私有(private)或者所有(all),默认: 所有(all) [optional] [enum: private, public, all]
affiliation String owner(授权用户拥有的仓库)、collaborator(授权用户为仓库成员)、organization_member(授权用户为仓库所在组织并有访问仓库权限)、enterprise_member(授权用户所在企业并有访问仓库权限)、admin(所有有权限的,包括所管理的组织中所有仓库、所管理的企业的所有仓库)。 可以用逗号分隔符组合。如: owner, organization_member 或 owner, collaborator, organization_member [optional]
type String 筛选用户仓库: 其创建(owner)、个人(personal)、其为成员(member)、公开(public)、私有(private),不能与 visibility 或 affiliation 参数一并使用,否则会报 422 错误 [optional] [enum: all, owner, personal, member, public, private]
sort String 排序方式: 创建时间(created),更新时间(updated),最后推送时间(pushed),仓库所属与名称(full_name)。默认: full_name [optional] [default to full_name] [enum: created, updated, pushed, full_name]
direction String 如果sort参数为full_name,用升序(asc)。否则降序(desc) [optional] [enum: asc, desc]
q String 搜索关键字 [optional]
page Integer 当前的页码 [optional] [default to 1]
perPage Integer 每页的数量,最大为 100 [optional] [default to 20] [enum: 1, 100]

Return type

List<Project>

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getUsersUsernameRepos

List<Project> getUsersUsernameRepos(username, type, sort, direction, page, perPage)

获取某个用户的公开仓库

获取某个用户的公开仓库

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String username = "username_example"; // String | 用户名(username/login)
String type = "all"; // String | 用户创建的仓库(owner),用户个人仓库(personal),用户为仓库成员(member),所有(all)。默认: 所有(all)
String sort = "full_name"; // String | 排序方式: 创建时间(created),更新时间(updated),最后推送时间(pushed),仓库所属与名称(full_name)。默认: full_name
String direction = "direction_example"; // String | 如果sort参数为full_name,用升序(asc)。否则降序(desc)
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量,最大为 100
try {
    List<Project> result = apiInstance.getUsersUsernameRepos(username, type, sort, direction, page, perPage);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#getUsersUsernameRepos");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
username String 用户名(username/login)
type String 用户创建的仓库(owner),用户个人仓库(personal),用户为仓库成员(member),所有(all)。默认: 所有(all) [optional] [default to all] [enum: all, owner, personal, member]
sort String 排序方式: 创建时间(created),更新时间(updated),最后推送时间(pushed),仓库所属与名称(full_name)。默认: full_name [optional] [default to full_name] [enum: created, updated, pushed, full_name]
direction String 如果sort参数为full_name,用升序(asc)。否则降序(desc) [optional] [enum: asc, desc]
page Integer 当前的页码 [optional] [default to 1]
perPage Integer 每页的数量,最大为 100 [optional] [default to 20] [enum: 1, 100]

Return type

List<Project>

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

patchReposOwnerRepo

Project patchReposOwnerRepo(owner, repo, body)

更新仓库设置

更新仓库设置

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
OwnerRepoBody body = new OwnerRepoBody(); // OwnerRepoBody | 
try {
    Project result = apiInstance.patchReposOwnerRepo(owner, repo, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#patchReposOwnerRepo");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
body OwnerRepoBody [optional]

Return type

Project

Authorization

OAuth2

HTTP request headers

  • Content-Type: /
  • Accept: application/json

patchReposOwnerRepoCommentsId

Note patchReposOwnerRepoCommentsId(owner, repo, id, body)

更新Commit评论

更新Commit评论

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
Integer id = 56; // Integer | 评论的ID
CommentBody body = new CommentBody(); // CommentBody | 
try {
    Note result = apiInstance.patchReposOwnerRepoCommentsId(owner, repo, id, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#patchReposOwnerRepoCommentsId");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
id Integer 评论的ID
body CommentBody [optional]

Return type

Note

Authorization

OAuth2

HTTP request headers

  • Content-Type: /
  • Accept: application/json

patchReposOwnerRepoReleasesId

Release patchReposOwnerRepoReleasesId(owner, repo, id, body)

更新仓库Release

更新仓库Release

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
Integer id = 56; // Integer | 
ReleasesIdBody body = new ReleasesIdBody(); // ReleasesIdBody | 
try {
    Release result = apiInstance.patchReposOwnerRepoReleasesId(owner, repo, id, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#patchReposOwnerRepoReleasesId");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
id Integer
body ReleasesIdBody [optional]

Return type

Release

Authorization

OAuth2

HTTP request headers

  • Content-Type: /
  • Accept: application/json

postEnterprisesEnterpriseRepos

Project postEnterprisesEnterpriseRepos(enterprise, body)

创建企业仓库

创建企业仓库

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String enterprise = "enterprise_example"; // String | 企业的路径(path/login)
EnterpriseReposBody body = new EnterpriseReposBody(); // EnterpriseReposBody | 
try {
    Project result = apiInstance.postEnterprisesEnterpriseRepos(enterprise, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#postEnterprisesEnterpriseRepos");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
enterprise String 企业的路径(path/login)
body EnterpriseReposBody [optional]

Return type

Project

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

postOrgsOrgRepos

Project postOrgsOrgRepos(org, body)

创建组织仓库

创建组织仓库

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String org = "org_example"; // String | 组织的路径(path/login)
OrgReposBody body = new OrgReposBody(); // OrgReposBody | 
try {
    Project result = apiInstance.postOrgsOrgRepos(org, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#postOrgsOrgRepos");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
org String 组织的路径(path/login)
body OrgReposBody [optional]

Return type

Project

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

postReposOwnerRepoBaiduStatisticKey

postReposOwnerRepoBaiduStatisticKey(owner, repo, body)

设置/更新仓库的百度统计 key

设置/更新仓库的百度统计 key

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
RepoBaiduStatisticKeyBody body = new RepoBaiduStatisticKeyBody(); // RepoBaiduStatisticKeyBody | 
try {
    apiInstance.postReposOwnerRepoBaiduStatisticKey(owner, repo, body);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#postReposOwnerRepoBaiduStatisticKey");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
body RepoBaiduStatisticKeyBody [optional]

Return type

null (empty response body)

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

postReposOwnerRepoBranches

CompleteBranch postReposOwnerRepoBranches(owner, repo, body)

创建分支

创建分支

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
RepoBranchesBody body = new RepoBranchesBody(); // RepoBranchesBody | 
try {
    CompleteBranch result = apiInstance.postReposOwnerRepoBranches(owner, repo, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#postReposOwnerRepoBranches");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
body RepoBranchesBody [optional]

Return type

CompleteBranch

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

postReposOwnerRepoCommits

RepoCommitWithFiles postReposOwnerRepoCommits(owner, repo, body)

提交多个文件变更

提交多个文件变更

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
RepoCommitsBody body = new RepoCommitsBody(); // RepoCommitsBody | 
try {
    RepoCommitWithFiles result = apiInstance.postReposOwnerRepoCommits(owner, repo, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#postReposOwnerRepoCommits");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
body RepoCommitsBody [optional]

Return type

RepoCommitWithFiles

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

postReposOwnerRepoCommitsShaComments

Note postReposOwnerRepoCommitsShaComments(owner, repo, sha, body)

创建Commit评论

创建Commit评论

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String sha = "sha_example"; // String | 评论的sha值
ShaCommentsBody body = new ShaCommentsBody(); // ShaCommentsBody | 
try {
    Note result = apiInstance.postReposOwnerRepoCommitsShaComments(owner, repo, sha, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#postReposOwnerRepoCommitsShaComments");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
sha String 评论的sha值
body ShaCommentsBody [optional]

Return type

Note

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

postReposOwnerRepoContentsPath

CommitContent postReposOwnerRepoContentsPath(owner, repo, path, body)

新建文件

新建文件

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String path = "path_example"; // String | 文件的路径
ContentsPathBody1 body = new ContentsPathBody1(); // ContentsPathBody1 | 
try {
    CommitContent result = apiInstance.postReposOwnerRepoContentsPath(owner, repo, path, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#postReposOwnerRepoContentsPath");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
path String 文件的路径
body ContentsPathBody1 [optional]

Return type

CommitContent

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

postReposOwnerRepoForks

Project postReposOwnerRepoForks(owner, repo, body)

Fork一个仓库

Fork一个仓库

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
RepoForksBody body = new RepoForksBody(); // RepoForksBody | 
try {
    Project result = apiInstance.postReposOwnerRepoForks(owner, repo, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#postReposOwnerRepoForks");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
body RepoForksBody [optional]

Return type

Project

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

postReposOwnerRepoKeys

SSHKey postReposOwnerRepoKeys(owner, repo, body)

为仓库添加公钥

为仓库添加公钥

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
RepoKeysBody body = new RepoKeysBody(); // RepoKeysBody | 
try {
    SSHKey result = apiInstance.postReposOwnerRepoKeys(owner, repo, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#postReposOwnerRepoKeys");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
body RepoKeysBody [optional]

Return type

SSHKey

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

postReposOwnerRepoOpen

postReposOwnerRepoOpen(owner, repo)

开通Gitee Go

开通Gitee Go

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库path
try {
    apiInstance.postReposOwnerRepoOpen(owner, repo);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#postReposOwnerRepoOpen");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库path

Return type

null (empty response body)

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

postReposOwnerRepoPagesBuilds

postReposOwnerRepoPagesBuilds(owner, repo)

请求建立Pages

请求建立Pages

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
try {
    apiInstance.postReposOwnerRepoPagesBuilds(owner, repo);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#postReposOwnerRepoPagesBuilds");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)

Return type

null (empty response body)

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

postReposOwnerRepoReleases

Release postReposOwnerRepoReleases(owner, repo, body)

创建仓库Release

创建仓库Release

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
RepoReleasesBody body = new RepoReleasesBody(); // RepoReleasesBody | 
try {
    Release result = apiInstance.postReposOwnerRepoReleases(owner, repo, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#postReposOwnerRepoReleases");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
body RepoReleasesBody [optional]

Return type

Release

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

postReposOwnerRepoReleasesReleaseIdAttachFiles

AttachFile postReposOwnerRepoReleasesReleaseIdAttachFiles(owner, repo, releaseId, file)

上传附件到仓库指定 Release

上传附件到仓库指定 Release

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
Integer releaseId = 56; // Integer | 发行版本的ID
File file = new File("file_example"); // File | 
try {
    AttachFile result = apiInstance.postReposOwnerRepoReleasesReleaseIdAttachFiles(owner, repo, releaseId, file);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#postReposOwnerRepoReleasesReleaseIdAttachFiles");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
releaseId Integer 发行版本的ID
file File [optional]

Return type

AttachFile

Authorization

OAuth2

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

postReposOwnerRepoTags

Tag postReposOwnerRepoTags(owner, repo, body)

创建一个仓库的 Tag

创建一个仓库的 Tag

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
RepoTagsBody body = new RepoTagsBody(); // RepoTagsBody | 
try {
    Tag result = apiInstance.postReposOwnerRepoTags(owner, repo, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#postReposOwnerRepoTags");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
body RepoTagsBody [optional]

Return type

Tag

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

postReposOwnerRepoTrafficData

ProjectTrafficData postReposOwnerRepoTrafficData(owner, repo, body)

获取最近30天的七日以内访问量

获取最近30天的七日以内访问量

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
RepoTrafficdataBody body = new RepoTrafficdataBody(); // RepoTrafficdataBody | 
try {
    ProjectTrafficData result = apiInstance.postReposOwnerRepoTrafficData(owner, repo, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#postReposOwnerRepoTrafficData");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
body RepoTrafficdataBody [optional]

Return type

ProjectTrafficData

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

postUserRepos

Project postUserRepos(body)

创建一个仓库

创建一个仓库

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
UserReposBody body = new UserReposBody(); // UserReposBody | 
try {
    Project result = apiInstance.postUserRepos(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#postUserRepos");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body UserReposBody [optional]

Return type

Project

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

putReposOwnerRepoBranchesBranchProtection

CompleteBranch putReposOwnerRepoBranchesBranchProtection(owner, repo, branch)

设置分支保护

设置分支保护

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String branch = "branch_example"; // String | 分支名称
try {
    CompleteBranch result = apiInstance.putReposOwnerRepoBranchesBranchProtection(owner, repo, branch);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#putReposOwnerRepoBranchesBranchProtection");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
branch String 分支名称

Return type

CompleteBranch

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

putReposOwnerRepoBranchesSettingNew

ProtectionRule putReposOwnerRepoBranchesSettingNew(owner, repo, body)

新建保护分支规则

新建保护分支规则

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
SettingNewBody body = new SettingNewBody(); // SettingNewBody | 
try {
    ProtectionRule result = apiInstance.putReposOwnerRepoBranchesSettingNew(owner, repo, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#putReposOwnerRepoBranchesSettingNew");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
body SettingNewBody [optional]

Return type

ProtectionRule

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

putReposOwnerRepoBranchesWildcardSetting

ProtectionRule putReposOwnerRepoBranchesWildcardSetting(owner, repo, wildcard, body)

更新保护分支规则

更新保护分支规则

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String wildcard = "wildcard_example"; // String | 分支/通配符
WildcardSettingBody body = new WildcardSettingBody(); // WildcardSettingBody | 
try {
    ProtectionRule result = apiInstance.putReposOwnerRepoBranchesWildcardSetting(owner, repo, wildcard, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#putReposOwnerRepoBranchesWildcardSetting");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
wildcard String 分支/通配符
body WildcardSettingBody [optional]

Return type

ProtectionRule

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

putReposOwnerRepoClear

putReposOwnerRepoClear(owner, repo)

清空一个仓库

清空一个仓库

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
try {
    apiInstance.putReposOwnerRepoClear(owner, repo);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#putReposOwnerRepoClear");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)

Return type

null (empty response body)

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

putReposOwnerRepoCollaboratorsUsername

ProjectMember putReposOwnerRepoCollaboratorsUsername(owner, repo, username, body)

添加仓库成员或更新仓库成员权限

添加仓库成员或更新仓库成员权限

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String username = "username_example"; // String | 用户名(username/login)
CollaboratorsUsernameBody body = new CollaboratorsUsernameBody(); // CollaboratorsUsernameBody | 
try {
    ProjectMember result = apiInstance.putReposOwnerRepoCollaboratorsUsername(owner, repo, username, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#putReposOwnerRepoCollaboratorsUsername");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
username String 用户名(username/login)
body CollaboratorsUsernameBody [optional]

Return type

ProjectMember

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

putReposOwnerRepoContentsPath

CommitContent putReposOwnerRepoContentsPath(owner, repo, path, body)

更新文件

更新文件

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
String path = "path_example"; // String | 文件的路径
ContentsPathBody body = new ContentsPathBody(); // ContentsPathBody | 
try {
    CommitContent result = apiInstance.putReposOwnerRepoContentsPath(owner, repo, path, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#putReposOwnerRepoContentsPath");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
path String 文件的路径
body ContentsPathBody [optional]

Return type

CommitContent

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

putReposOwnerRepoKeysEnableId

putReposOwnerRepoKeysEnableId(owner, repo, id)

启用仓库公钥

启用仓库公钥

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
Integer id = 56; // Integer | 公钥 ID
try {
    apiInstance.putReposOwnerRepoKeysEnableId(owner, repo, id);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#putReposOwnerRepoKeysEnableId");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
id Integer 公钥 ID

Return type

null (empty response body)

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

putReposOwnerRepoPages

putReposOwnerRepoPages(owner, repo, body)

上传设置 Pages SSL 证书和域名

上传设置 Pages SSL 证书和域名

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
RepoPagesBody body = new RepoPagesBody(); // RepoPagesBody | 
try {
    apiInstance.putReposOwnerRepoPages(owner, repo, body);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#putReposOwnerRepoPages");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
body RepoPagesBody [optional]

Return type

null (empty response body)

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

putReposOwnerRepoPushConfig

ProjectPushConfig putReposOwnerRepoPushConfig(owner, repo, body)

修改仓库推送规则设置

修改仓库推送规则设置

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
RepoPushConfigBody body = new RepoPushConfigBody(); // RepoPushConfigBody | 
try {
    ProjectPushConfig result = apiInstance.putReposOwnerRepoPushConfig(owner, repo, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#putReposOwnerRepoPushConfig");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
body RepoPushConfigBody [optional]

Return type

ProjectPushConfig

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

putReposOwnerRepoReviewer

Project putReposOwnerRepoReviewer(owner, repo, body)

修改代码审查设置

修改代码审查设置

Example

// 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.RepositoriesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");

RepositoriesApi apiInstance = new RepositoriesApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
RepoReviewerBody body = new RepoReviewerBody(); // RepoReviewerBody | 
try {
    Project result = apiInstance.putReposOwnerRepoReviewer(owner, repo, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling RepositoriesApi#putReposOwnerRepoReviewer");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
body RepoReviewerBody [optional]

Return type

Project

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/sdk/gitee5j.git
git@gitee.com:sdk/gitee5j.git
sdk
gitee5j
gitee5j
main

搜索帮助