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
克隆/下载
ActivityApi.md 62.19 KB
一键复制 编辑 原始数据 按行查看 历史

ActivityApi

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

Method HTTP request Description
deleteUserStarredOwnerRepo DELETE /user/starred/{owner}/{repo} 取消 star 一个仓库
deleteUserSubscriptionsOwnerRepo DELETE /user/subscriptions/{owner}/{repo} 取消 watch 一个仓库
getNetworksOwnerRepoEvents GET /networks/{owner}/{repo}/events 列出仓库的所有公开动态
getNotificationsCount GET /notifications/count 获取授权用户的通知数
getNotificationsMessages GET /notifications/messages 列出授权用户的所有私信
getNotificationsMessagesId GET /notifications/messages/{id} 获取一条私信
getNotificationsThreads GET /notifications/threads 列出授权用户的所有通知
getNotificationsThreadsId GET /notifications/threads/{id} 获取一条通知
getOrgsOrgEvents GET /orgs/{org}/events 列出组织的公开动态
getReposOwnerRepoEvents GET /repos/{owner}/{repo}/events 列出仓库的所有动态
getReposOwnerRepoNotifications GET /repos/{owner}/{repo}/notifications 列出一个仓库里的通知
getReposOwnerRepoStargazers GET /repos/{owner}/{repo}/stargazers 列出 star 了仓库的用户
getReposOwnerRepoSubscribers GET /repos/{owner}/{repo}/subscribers 列出 watch 了仓库的用户
getUserStarred GET /user/starred 列出授权用户 star 了的仓库
getUserStarredOwnerRepo GET /user/starred/{owner}/{repo} 检查授权用户是否 star 了一个仓库
getUserSubscriptions GET /user/subscriptions 列出授权用户 watch 了的仓库
getUserSubscriptionsOwnerRepo GET /user/subscriptions/{owner}/{repo} 检查授权用户是否 watch 了一个仓库
getUsersUsernameEvents GET /users/{username}/events 列出用户的动态
getUsersUsernameEventsOrgsOrg GET /users/{username}/events/orgs/{org} 列出用户所属组织的动态
getUsersUsernameEventsPublic GET /users/{username}/events/public 列出用户的公开动态
getUsersUsernameReceivedEvents GET /users/{username}/received_events 列出一个用户收到的动态
getUsersUsernameReceivedEventsPublic GET /users/{username}/received_events/public 列出一个用户收到的公开动态
getUsersUsernameStarred GET /users/{username}/starred 列出用户 star 了的仓库
getUsersUsernameSubscriptions GET /users/{username}/subscriptions 列出用户 watch 了的仓库
patchNotificationsMessagesId PATCH /notifications/messages/{id} 标记一条私信为已读
patchNotificationsThreadsId PATCH /notifications/threads/{id} 标记一条通知为已读
postNotificationsMessages POST /notifications/messages 发送私信给指定用户
putNotificationsMessages PUT /notifications/messages 标记所有私信为已读
putNotificationsThreads PUT /notifications/threads 标记所有通知为已读
putReposOwnerRepoNotifications PUT /repos/{owner}/{repo}/notifications 标记一个仓库里的通知为已读
putUserStarredOwnerRepo PUT /user/starred/{owner}/{repo} star 一个仓库
putUserSubscriptionsOwnerRepo PUT /user/subscriptions/{owner}/{repo} watch 一个仓库

deleteUserStarredOwnerRepo

deleteUserStarredOwnerRepo(owner, repo)

取消 star 一个仓库

取消 star 一个仓库

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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

deleteUserSubscriptionsOwnerRepo

deleteUserSubscriptionsOwnerRepo(owner, repo)

取消 watch 一个仓库

取消 watch 一个仓库

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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

getNetworksOwnerRepoEvents

List<Event> getNetworksOwnerRepoEvents(owner, repo, prevId, limit)

列出仓库的所有公开动态

列出仓库的所有公开动态

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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ActivityApi apiInstance = new ActivityApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
Integer prevId = 56; // Integer | 滚动列表的最后一条记录的id
Integer limit = 20; // Integer | 滚动列表每页的数量,最大为 100
try {
    List<Event> result = apiInstance.getNetworksOwnerRepoEvents(owner, repo, prevId, limit);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ActivityApi#getNetworksOwnerRepoEvents");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
prevId Integer 滚动列表的最后一条记录的id [optional]
limit Integer 滚动列表每页的数量,最大为 100 [optional] [default to 20]

Return type

List<Event>

Authorization

OAuth2

HTTP request headers

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

getNotificationsCount

UserNotificationCount getNotificationsCount(unread)

获取授权用户的通知数

获取授权用户的通知数

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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ActivityApi apiInstance = new ActivityApi();
Boolean unread = true; // Boolean | 是否只获取未读消息,默认:否
try {
    UserNotificationCount result = apiInstance.getNotificationsCount(unread);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ActivityApi#getNotificationsCount");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
unread Boolean 是否只获取未读消息,默认:否 [optional]

Return type

UserNotificationCount

Authorization

OAuth2

HTTP request headers

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

getNotificationsMessages

UserMessageList getNotificationsMessages(unread, since, before, ids, 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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ActivityApi apiInstance = new ActivityApi();
Boolean unread = true; // Boolean | 是否只显示未读私信,默认:否
String since = "since_example"; // String | 只获取在给定时间后更新的私信,要求时间格式为 ISO 8601
String before = "before_example"; // String | 只获取在给定时间前更新的私信,要求时间格式为 ISO 8601
String ids = "ids_example"; // String | 指定一组私信 ID,以 , 分隔
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量,最大为 100
try {
    UserMessageList result = apiInstance.getNotificationsMessages(unread, since, before, ids, page, perPage);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ActivityApi#getNotificationsMessages");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
unread Boolean 是否只显示未读私信,默认:否 [optional]
since String 只获取在给定时间后更新的私信,要求时间格式为 ISO 8601 [optional]
before String 只获取在给定时间前更新的私信,要求时间格式为 ISO 8601 [optional]
ids String 指定一组私信 ID,以 , 分隔 [optional]
page Integer 当前的页码 [optional] [default to 1]
perPage Integer 每页的数量,最大为 100 [optional] [default to 20] [enum: 1, 100]

Return type

UserMessageList

Authorization

OAuth2

HTTP request headers

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

getNotificationsMessagesId

UserMessage getNotificationsMessagesId(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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ActivityApi apiInstance = new ActivityApi();
Integer id = 56; // Integer | 私信的 ID
try {
    UserMessage result = apiInstance.getNotificationsMessagesId(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ActivityApi#getNotificationsMessagesId");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id Integer 私信的 ID

Return type

UserMessage

Authorization

OAuth2

HTTP request headers

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

getNotificationsThreads

UserNotificationList getNotificationsThreads(unread, participating, type, since, before, ids, 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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ActivityApi apiInstance = new ActivityApi();
Boolean unread = true; // Boolean | 是否只获取未读消息,默认:否
Boolean participating = true; // Boolean | 是否只获取自己直接参与的消息,默认:否
String type = "all"; // String | 筛选指定类型的通知,all:所有,event:事件通知,referer:@ 通知
String since = "since_example"; // String | 只获取在给定时间后更新的消息,要求时间格式为 ISO 8601
String before = "before_example"; // String | 只获取在给定时间前更新的消息,要求时间格式为 ISO 8601
String ids = "ids_example"; // String | 指定一组通知 ID,以 , 分隔
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量,最大为 100
try {
    UserNotificationList result = apiInstance.getNotificationsThreads(unread, participating, type, since, before, ids, page, perPage);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ActivityApi#getNotificationsThreads");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
unread Boolean 是否只获取未读消息,默认:否 [optional]
participating Boolean 是否只获取自己直接参与的消息,默认:否 [optional]
type String 筛选指定类型的通知,all:所有,event:事件通知,referer:@ 通知 [optional] [default to all] [enum: all, event, referer]
since String 只获取在给定时间后更新的消息,要求时间格式为 ISO 8601 [optional]
before String 只获取在给定时间前更新的消息,要求时间格式为 ISO 8601 [optional]
ids String 指定一组通知 ID,以 , 分隔 [optional]
page Integer 当前的页码 [optional] [default to 1]
perPage Integer 每页的数量,最大为 100 [optional] [default to 20] [enum: 1, 100]

Return type

UserNotificationList

Authorization

OAuth2

HTTP request headers

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

getNotificationsThreadsId

UserNotification getNotificationsThreadsId(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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ActivityApi apiInstance = new ActivityApi();
Integer id = 56; // Integer | 通知的 ID
try {
    UserNotification result = apiInstance.getNotificationsThreadsId(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ActivityApi#getNotificationsThreadsId");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id Integer 通知的 ID

Return type

UserNotification

Authorization

OAuth2

HTTP request headers

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

getOrgsOrgEvents

List<Event> getOrgsOrgEvents(org, prevId, limit)

列出组织的公开动态

列出组织的公开动态

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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ActivityApi apiInstance = new ActivityApi();
String org = "org_example"; // String | 组织的路径(path/login)
Integer prevId = 56; // Integer | 滚动列表的最后一条记录的id
Integer limit = 20; // Integer | 滚动列表每页的数量,最大为 100
try {
    List<Event> result = apiInstance.getOrgsOrgEvents(org, prevId, limit);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ActivityApi#getOrgsOrgEvents");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
org String 组织的路径(path/login)
prevId Integer 滚动列表的最后一条记录的id [optional]
limit Integer 滚动列表每页的数量,最大为 100 [optional] [default to 20]

Return type

List<Event>

Authorization

OAuth2

HTTP request headers

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

getReposOwnerRepoEvents

List<Event> getReposOwnerRepoEvents(owner, repo, prevId, limit)

列出仓库的所有动态

列出仓库的所有动态

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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ActivityApi apiInstance = new ActivityApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
Integer prevId = 56; // Integer | 滚动列表的最后一条记录的id
Integer limit = 20; // Integer | 滚动列表每页的数量,最大为 100
try {
    List<Event> result = apiInstance.getReposOwnerRepoEvents(owner, repo, prevId, limit);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ActivityApi#getReposOwnerRepoEvents");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
prevId Integer 滚动列表的最后一条记录的id [optional]
limit Integer 滚动列表每页的数量,最大为 100 [optional] [default to 20]

Return type

List<Event>

Authorization

OAuth2

HTTP request headers

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

getReposOwnerRepoNotifications

UserNotificationList getReposOwnerRepoNotifications(owner, repo, unread, participating, type, since, before, ids, 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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ActivityApi apiInstance = new ActivityApi();
String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path)
String repo = "repo_example"; // String | 仓库路径(path)
Boolean unread = true; // Boolean | 是否只获取未读消息,默认:否
Boolean participating = true; // Boolean | 是否只获取自己直接参与的消息,默认:否
String type = "all"; // String | 筛选指定类型的通知,all:所有,event:事件通知,referer:@ 通知
String since = "since_example"; // String | 只获取在给定时间后更新的消息,要求时间格式为 ISO 8601
String before = "before_example"; // String | 只获取在给定时间前更新的消息,要求时间格式为 ISO 8601
String ids = "ids_example"; // String | 指定一组通知 ID,以 , 分隔
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量,最大为 100
try {
    UserNotificationList result = apiInstance.getReposOwnerRepoNotifications(owner, repo, unread, participating, type, since, before, ids, page, perPage);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ActivityApi#getReposOwnerRepoNotifications");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String 仓库所属空间地址(企业、组织或个人的地址path)
repo String 仓库路径(path)
unread Boolean 是否只获取未读消息,默认:否 [optional]
participating Boolean 是否只获取自己直接参与的消息,默认:否 [optional]
type String 筛选指定类型的通知,all:所有,event:事件通知,referer:@ 通知 [optional] [default to all] [enum: all, event, referer]
since String 只获取在给定时间后更新的消息,要求时间格式为 ISO 8601 [optional]
before String 只获取在给定时间前更新的消息,要求时间格式为 ISO 8601 [optional]
ids String 指定一组通知 ID,以 , 分隔 [optional]
page Integer 当前的页码 [optional] [default to 1]
perPage Integer 每页的数量,最大为 100 [optional] [default to 20] [enum: 1, 100]

Return type

UserNotificationList

Authorization

OAuth2

HTTP request headers

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

getReposOwnerRepoStargazers

List<ProjectStargazers> getReposOwnerRepoStargazers(owner, repo, page, perPage)

列出 star 了仓库的用户

列出 star 了仓库的用户

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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

Authorization

OAuth2

HTTP request headers

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

getReposOwnerRepoSubscribers

List<ProjectWatchers> getReposOwnerRepoSubscribers(owner, repo, page, perPage)

列出 watch 了仓库的用户

列出 watch 了仓库的用户

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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

Authorization

OAuth2

HTTP request headers

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

getUserStarred

List<Project> getUserStarred(sort, direction, page, perPage)

列出授权用户 star 了的仓库

列出授权用户 star 了的仓库

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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ActivityApi apiInstance = new ActivityApi();
String sort = "created"; // String | 根据仓库创建时间(created)或最后推送时间(updated)进行排序,默认:创建时间
String direction = "desc"; // String | 按递增(asc)或递减(desc)排序,默认:递减
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量,最大为 100
try {
    List<Project> result = apiInstance.getUserStarred(sort, direction, page, perPage);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ActivityApi#getUserStarred");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
sort String 根据仓库创建时间(created)或最后推送时间(updated)进行排序,默认:创建时间 [optional] [default to created] [enum: created, last_push]
direction String 按递增(asc)或递减(desc)排序,默认:递减 [optional] [default to desc] [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

getUserStarredOwnerRepo

getUserStarredOwnerRepo(owner, repo)

检查授权用户是否 star 了一个仓库

检查授权用户是否 star 了一个仓库

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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

getUserSubscriptions

List<Project> getUserSubscriptions(sort, direction, page, perPage)

列出授权用户 watch 了的仓库

列出授权用户 watch 了的仓库

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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ActivityApi apiInstance = new ActivityApi();
String sort = "created"; // String | 根据仓库创建时间(created)或最后推送时间(updated)进行排序,默认:创建时间
String direction = "desc"; // String | 按递增(asc)或递减(desc)排序,默认:递减
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量,最大为 100
try {
    List<Project> result = apiInstance.getUserSubscriptions(sort, direction, page, perPage);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ActivityApi#getUserSubscriptions");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
sort String 根据仓库创建时间(created)或最后推送时间(updated)进行排序,默认:创建时间 [optional] [default to created] [enum: created, last_push]
direction String 按递增(asc)或递减(desc)排序,默认:递减 [optional] [default to desc] [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

getUserSubscriptionsOwnerRepo

getUserSubscriptionsOwnerRepo(owner, repo)

检查授权用户是否 watch 了一个仓库

检查授权用户是否 watch 了一个仓库

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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

getUsersUsernameEvents

List<Event> getUsersUsernameEvents(username, prevId, limit)

列出用户的动态

列出用户的动态

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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ActivityApi apiInstance = new ActivityApi();
String username = "username_example"; // String | 用户名(username/login)
Integer prevId = 56; // Integer | 滚动列表的最后一条记录的id
Integer limit = 20; // Integer | 滚动列表每页的数量,最大为 100
try {
    List<Event> result = apiInstance.getUsersUsernameEvents(username, prevId, limit);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ActivityApi#getUsersUsernameEvents");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
username String 用户名(username/login)
prevId Integer 滚动列表的最后一条记录的id [optional]
limit Integer 滚动列表每页的数量,最大为 100 [optional] [default to 20]

Return type

List<Event>

Authorization

OAuth2

HTTP request headers

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

getUsersUsernameEventsOrgsOrg

List<Event> getUsersUsernameEventsOrgsOrg(username, org, prevId, limit)

列出用户所属组织的动态

列出用户所属组织的动态

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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ActivityApi apiInstance = new ActivityApi();
String username = "username_example"; // String | 用户名(username/login)
String org = "org_example"; // String | 组织的路径(path/login)
Integer prevId = 56; // Integer | 滚动列表的最后一条记录的id
Integer limit = 20; // Integer | 滚动列表每页的数量,最大为 100
try {
    List<Event> result = apiInstance.getUsersUsernameEventsOrgsOrg(username, org, prevId, limit);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ActivityApi#getUsersUsernameEventsOrgsOrg");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
username String 用户名(username/login)
org String 组织的路径(path/login)
prevId Integer 滚动列表的最后一条记录的id [optional]
limit Integer 滚动列表每页的数量,最大为 100 [optional] [default to 20]

Return type

List<Event>

Authorization

OAuth2

HTTP request headers

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

getUsersUsernameEventsPublic

List<Event> getUsersUsernameEventsPublic(username, prevId, limit)

列出用户的公开动态

列出用户的公开动态

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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ActivityApi apiInstance = new ActivityApi();
String username = "username_example"; // String | 用户名(username/login)
Integer prevId = 56; // Integer | 滚动列表的最后一条记录的id
Integer limit = 20; // Integer | 滚动列表每页的数量,最大为 100
try {
    List<Event> result = apiInstance.getUsersUsernameEventsPublic(username, prevId, limit);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ActivityApi#getUsersUsernameEventsPublic");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
username String 用户名(username/login)
prevId Integer 滚动列表的最后一条记录的id [optional]
limit Integer 滚动列表每页的数量,最大为 100 [optional] [default to 20]

Return type

List<Event>

Authorization

OAuth2

HTTP request headers

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

getUsersUsernameReceivedEvents

List<Event> getUsersUsernameReceivedEvents(username, prevId, limit)

列出一个用户收到的动态

列出一个用户收到的动态

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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ActivityApi apiInstance = new ActivityApi();
String username = "username_example"; // String | 用户名(username/login)
Integer prevId = 56; // Integer | 滚动列表的最后一条记录的id
Integer limit = 20; // Integer | 滚动列表每页的数量,最大为 100
try {
    List<Event> result = apiInstance.getUsersUsernameReceivedEvents(username, prevId, limit);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ActivityApi#getUsersUsernameReceivedEvents");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
username String 用户名(username/login)
prevId Integer 滚动列表的最后一条记录的id [optional]
limit Integer 滚动列表每页的数量,最大为 100 [optional] [default to 20]

Return type

List<Event>

Authorization

OAuth2

HTTP request headers

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

getUsersUsernameReceivedEventsPublic

List<Event> getUsersUsernameReceivedEventsPublic(username, prevId, limit)

列出一个用户收到的公开动态

列出一个用户收到的公开动态

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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ActivityApi apiInstance = new ActivityApi();
String username = "username_example"; // String | 用户名(username/login)
Integer prevId = 56; // Integer | 滚动列表的最后一条记录的id
Integer limit = 20; // Integer | 滚动列表每页的数量,最大为 100
try {
    List<Event> result = apiInstance.getUsersUsernameReceivedEventsPublic(username, prevId, limit);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ActivityApi#getUsersUsernameReceivedEventsPublic");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
username String 用户名(username/login)
prevId Integer 滚动列表的最后一条记录的id [optional]
limit Integer 滚动列表每页的数量,最大为 100 [optional] [default to 20]

Return type

List<Event>

Authorization

OAuth2

HTTP request headers

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

getUsersUsernameStarred

List<Project> getUsersUsernameStarred(username, prevId, limit, sort, direction)

列出用户 star 了的仓库

列出用户 star 了的仓库

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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ActivityApi apiInstance = new ActivityApi();
String username = "username_example"; // String | 用户名(username/login)
Integer prevId = 56; // Integer | 滚动列表的最后一条记录的id
Integer limit = 20; // Integer | 滚动列表每页的数量,最大为 100
String sort = "created"; // String | 根据仓库创建时间(created)或最后推送时间(updated)进行排序,默认:创建时间
String direction = "desc"; // String | 按递增(asc)或递减(desc)排序,默认:递减
try {
    List<Project> result = apiInstance.getUsersUsernameStarred(username, prevId, limit, sort, direction);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ActivityApi#getUsersUsernameStarred");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
username String 用户名(username/login)
prevId Integer 滚动列表的最后一条记录的id [optional]
limit Integer 滚动列表每页的数量,最大为 100 [optional] [default to 20]
sort String 根据仓库创建时间(created)或最后推送时间(updated)进行排序,默认:创建时间 [optional] [default to created] [enum: created, last_push]
direction String 按递增(asc)或递减(desc)排序,默认:递减 [optional] [default to desc] [enum: asc, desc]

Return type

List<Project>

Authorization

OAuth2

HTTP request headers

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

getUsersUsernameSubscriptions

List<Project> getUsersUsernameSubscriptions(username, prevId, limit, sort, direction)

列出用户 watch 了的仓库

列出用户 watch 了的仓库

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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ActivityApi apiInstance = new ActivityApi();
String username = "username_example"; // String | 用户名(username/login)
Integer prevId = 56; // Integer | 滚动列表的最后一条记录的id
Integer limit = 20; // Integer | 滚动列表每页的数量,最大为 100
String sort = "created"; // String | 根据仓库创建时间(created)或最后推送时间(updated)进行排序,默认:创建时间
String direction = "desc"; // String | 按递增(asc)或递减(desc)排序,默认:递减
try {
    List<Project> result = apiInstance.getUsersUsernameSubscriptions(username, prevId, limit, sort, direction);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ActivityApi#getUsersUsernameSubscriptions");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
username String 用户名(username/login)
prevId Integer 滚动列表的最后一条记录的id [optional]
limit Integer 滚动列表每页的数量,最大为 100 [optional] [default to 20]
sort String 根据仓库创建时间(created)或最后推送时间(updated)进行排序,默认:创建时间 [optional] [default to created] [enum: created, last_push]
direction String 按递增(asc)或递减(desc)排序,默认:递减 [optional] [default to desc] [enum: asc, desc]

Return type

List<Project>

Authorization

OAuth2

HTTP request headers

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

patchNotificationsMessagesId

patchNotificationsMessagesId(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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ActivityApi apiInstance = new ActivityApi();
Integer id = 56; // Integer | 私信的 ID
try {
    apiInstance.patchNotificationsMessagesId(id);
} catch (ApiException e) {
    System.err.println("Exception when calling ActivityApi#patchNotificationsMessagesId");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id Integer 私信的 ID

Return type

null (empty response body)

Authorization

OAuth2

HTTP request headers

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

patchNotificationsThreadsId

patchNotificationsThreadsId(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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ActivityApi apiInstance = new ActivityApi();
Integer id = 56; // Integer | 通知的 ID
try {
    apiInstance.patchNotificationsThreadsId(id);
} catch (ApiException e) {
    System.err.println("Exception when calling ActivityApi#patchNotificationsThreadsId");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id Integer 通知的 ID

Return type

null (empty response body)

Authorization

OAuth2

HTTP request headers

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

postNotificationsMessages

UserMessage postNotificationsMessages(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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ActivityApi apiInstance = new ActivityApi();
NotificationsMessagesBody1 body = new NotificationsMessagesBody1(); // NotificationsMessagesBody1 | 
try {
    UserMessage result = apiInstance.postNotificationsMessages(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ActivityApi#postNotificationsMessages");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body NotificationsMessagesBody1 [optional]

Return type

UserMessage

Authorization

OAuth2

HTTP request headers

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

putNotificationsMessages

putNotificationsMessages(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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ActivityApi apiInstance = new ActivityApi();
NotificationsMessagesBody body = new NotificationsMessagesBody(); // NotificationsMessagesBody | 
try {
    apiInstance.putNotificationsMessages(body);
} catch (ApiException e) {
    System.err.println("Exception when calling ActivityApi#putNotificationsMessages");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body NotificationsMessagesBody [optional]

Return type

null (empty response body)

Authorization

OAuth2

HTTP request headers

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

putNotificationsThreads

putNotificationsThreads(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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ActivityApi apiInstance = new ActivityApi();
NotificationsThreadsBody body = new NotificationsThreadsBody(); // NotificationsThreadsBody | 
try {
    apiInstance.putNotificationsThreads(body);
} catch (ApiException e) {
    System.err.println("Exception when calling ActivityApi#putNotificationsThreads");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body NotificationsThreadsBody [optional]

Return type

null (empty response body)

Authorization

OAuth2

HTTP request headers

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

putReposOwnerRepoNotifications

putReposOwnerRepoNotifications(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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

Parameters

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

Return type

null (empty response body)

Authorization

OAuth2

HTTP request headers

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

putUserStarredOwnerRepo

putUserStarredOwnerRepo(owner, repo)

star 一个仓库

star 一个仓库

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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

putUserSubscriptionsOwnerRepo

putUserSubscriptionsOwnerRepo(owner, repo, body)

watch 一个仓库

watch 一个仓库

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.ActivityApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

Parameters

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

Return type

null (empty response body)

Authorization

OAuth2

HTTP request headers

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

搜索帮助