All URIs are relative to https://gitee.com/api
Method | HTTP request | Description |
---|---|---|
deleteV5GistsGistIdCommentsId | DELETE v5/gists/{gist_id}/comments/{id} | 删除代码片段的评论 |
deleteV5GistsId | DELETE v5/gists/{id} | 删除该条代码片段 |
deleteV5GistsIdStar | DELETE v5/gists/{id}/star | 取消Star代码片段 |
getV5Gists | GET v5/gists | 获取代码片段 |
getV5GistsGistIdComments | GET v5/gists/{gist_id}/comments | 获取代码片段的评论 |
getV5GistsGistIdCommentsId | GET v5/gists/{gist_id}/comments/{id} | 获取单条代码片段的评论 |
getV5GistsId | GET v5/gists/{id} | 获取单条代码片段 |
getV5GistsIdCommits | GET v5/gists/{id}/commits | 获取代码片段的commit |
getV5GistsIdForks | GET v5/gists/{id}/forks | 获取Fork该条代码片段的列表 |
getV5GistsIdStar | GET v5/gists/{id}/star | 判断代码片段是否已Star |
getV5GistsPublic | GET v5/gists/public | 获取公开的代码片段 |
getV5GistsStarred | GET v5/gists/starred | 获取用户Star的代码片段 |
getV5UsersUsernameGists | GET v5/users/{username}/gists | 获取指定用户的公开代码片段 |
patchV5GistsGistIdCommentsId | PATCH v5/gists/{gist_id}/comments/{id} | 修改代码片段的评论 |
patchV5GistsId | PATCH v5/gists/{id} | 修改代码片段 |
postV5Gists | POST v5/gists | 创建代码片段 |
postV5GistsGistIdComments | POST v5/gists/{gist_id}/comments | 增加代码片段的评论 |
postV5GistsIdForks | POST v5/gists/{id}/forks | Fork代码片段 |
putV5GistsIdStar | PUT v5/gists/{id}/star | Star代码片段 |
Void deleteV5GistsGistIdCommentsId(gistId, id, accessToken)
删除代码片段的评论
删除代码片段的评论
// Import classes:
//import com.gitee.api.api.GistsApi;
GistsApi apiInstance = new ApiClient().create(GistsApi.class);
String gistId = "gistId_example"; // String | 代码片段的ID
Integer id = 56; // Integer | 评论的ID
String accessToken = "accessToken_example"; // String | 用户授权码
Observable<Void> result = apiInstance.deleteV5GistsGistIdCommentsId(gistId, id, accessToken);
result.subscribe(new Observer<Void>() {
@Override
public void onCompleted() {
System.out.println("finish!");
}
@Override
public void onError(Throwable throwable) {
System.out.println(throwable);
}
@Override
public void onNext(Void response) {
System.out.println(response);
}
});
Name | Type | Description | Notes |
---|---|---|---|
gistId | String | 代码片段的ID | |
id | Integer | 评论的ID | |
accessToken | String | 用户授权码 | [optional] |
No authorization required
Void deleteV5GistsId(id, accessToken)
删除该条代码片段
删除该条代码片段
// Import classes:
//import com.gitee.api.api.GistsApi;
GistsApi apiInstance = new ApiClient().create(GistsApi.class);
String id = "id_example"; // String | 代码片段的ID
String accessToken = "accessToken_example"; // String | 用户授权码
Observable<Void> result = apiInstance.deleteV5GistsId(id, accessToken);
result.subscribe(new Observer<Void>() {
@Override
public void onCompleted() {
System.out.println("finish!");
}
@Override
public void onError(Throwable throwable) {
System.out.println(throwable);
}
@Override
public void onNext(Void response) {
System.out.println(response);
}
});
Name | Type | Description | Notes |
---|---|---|---|
id | String | 代码片段的ID | |
accessToken | String | 用户授权码 | [optional] |
No authorization required
Void deleteV5GistsIdStar(id, accessToken)
取消Star代码片段
取消Star代码片段
// Import classes:
//import com.gitee.api.api.GistsApi;
GistsApi apiInstance = new ApiClient().create(GistsApi.class);
String id = "id_example"; // String | 代码片段的ID
String accessToken = "accessToken_example"; // String | 用户授权码
Observable<Void> result = apiInstance.deleteV5GistsIdStar(id, accessToken);
result.subscribe(new Observer<Void>() {
@Override
public void onCompleted() {
System.out.println("finish!");
}
@Override
public void onError(Throwable throwable) {
System.out.println(throwable);
}
@Override
public void onNext(Void response) {
System.out.println(response);
}
});
Name | Type | Description | Notes |
---|---|---|---|
id | String | 代码片段的ID | |
accessToken | String | 用户授权码 | [optional] |
No authorization required
java.util.List<Code> getV5Gists(accessToken, since, page, perPage)
获取代码片段
获取代码片段
// Import classes:
//import com.gitee.api.api.GistsApi;
GistsApi apiInstance = new ApiClient().create(GistsApi.class);
String accessToken = "accessToken_example"; // String | 用户授权码
String since = "since_example"; // String | 起始的更新时间,要求时间格式为 ISO 8601
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量
Observable<java.util.List<Code>> result = apiInstance.getV5Gists(accessToken, since, page, perPage);
result.subscribe(new Observer<java.util.List<Code>>() {
@Override
public void onCompleted() {
System.out.println("finish!");
}
@Override
public void onError(Throwable throwable) {
System.out.println(throwable);
}
@Override
public void onNext(java.util.List<Code> response) {
System.out.println(response);
}
});
Name | Type | Description | Notes |
---|---|---|---|
accessToken | String | 用户授权码 | [optional] |
since | String | 起始的更新时间,要求时间格式为 ISO 8601 | [optional] |
page | Integer | 当前的页码 | [optional] [default to 1] |
perPage | Integer | 每页的数量 | [optional] [default to 20] |
No authorization required
java.util.List<CodeComment> getV5GistsGistIdComments(gistId, accessToken, page, perPage)
获取代码片段的评论
获取代码片段的评论
// Import classes:
//import com.gitee.api.api.GistsApi;
GistsApi apiInstance = new ApiClient().create(GistsApi.class);
String gistId = "gistId_example"; // String | 代码片段的ID
String accessToken = "accessToken_example"; // String | 用户授权码
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量
Observable<java.util.List<CodeComment>> result = apiInstance.getV5GistsGistIdComments(gistId, accessToken, page, perPage);
result.subscribe(new Observer<java.util.List<CodeComment>>() {
@Override
public void onCompleted() {
System.out.println("finish!");
}
@Override
public void onError(Throwable throwable) {
System.out.println(throwable);
}
@Override
public void onNext(java.util.List<CodeComment> response) {
System.out.println(response);
}
});
Name | Type | Description | Notes |
---|---|---|---|
gistId | String | 代码片段的ID | |
accessToken | String | 用户授权码 | [optional] |
page | Integer | 当前的页码 | [optional] [default to 1] |
perPage | Integer | 每页的数量 | [optional] [default to 20] |
No authorization required
CodeComment getV5GistsGistIdCommentsId(gistId, id, accessToken)
获取单条代码片段的评论
获取单条代码片段的评论
// Import classes:
//import com.gitee.api.api.GistsApi;
GistsApi apiInstance = new ApiClient().create(GistsApi.class);
String gistId = "gistId_example"; // String | 代码片段的ID
Integer id = 56; // Integer | 评论的ID
String accessToken = "accessToken_example"; // String | 用户授权码
Observable<CodeComment> result = apiInstance.getV5GistsGistIdCommentsId(gistId, id, accessToken);
result.subscribe(new Observer<CodeComment>() {
@Override
public void onCompleted() {
System.out.println("finish!");
}
@Override
public void onError(Throwable throwable) {
System.out.println(throwable);
}
@Override
public void onNext(CodeComment response) {
System.out.println(response);
}
});
Name | Type | Description | Notes |
---|---|---|---|
gistId | String | 代码片段的ID | |
id | Integer | 评论的ID | |
accessToken | String | 用户授权码 | [optional] |
No authorization required
CodeForksHistory getV5GistsId(id, accessToken)
获取单条代码片段
获取单条代码片段
// Import classes:
//import com.gitee.api.api.GistsApi;
GistsApi apiInstance = new ApiClient().create(GistsApi.class);
String id = "id_example"; // String | 代码片段的ID
String accessToken = "accessToken_example"; // String | 用户授权码
Observable<CodeForksHistory> result = apiInstance.getV5GistsId(id, accessToken);
result.subscribe(new Observer<CodeForksHistory>() {
@Override
public void onCompleted() {
System.out.println("finish!");
}
@Override
public void onError(Throwable throwable) {
System.out.println(throwable);
}
@Override
public void onNext(CodeForksHistory response) {
System.out.println(response);
}
});
Name | Type | Description | Notes |
---|---|---|---|
id | String | 代码片段的ID | |
accessToken | String | 用户授权码 | [optional] |
No authorization required
CodeForksHistory getV5GistsIdCommits(id, accessToken)
获取代码片段的commit
获取代码片段的commit
// Import classes:
//import com.gitee.api.api.GistsApi;
GistsApi apiInstance = new ApiClient().create(GistsApi.class);
String id = "id_example"; // String | 代码片段的ID
String accessToken = "accessToken_example"; // String | 用户授权码
Observable<CodeForksHistory> result = apiInstance.getV5GistsIdCommits(id, accessToken);
result.subscribe(new Observer<CodeForksHistory>() {
@Override
public void onCompleted() {
System.out.println("finish!");
}
@Override
public void onError(Throwable throwable) {
System.out.println(throwable);
}
@Override
public void onNext(CodeForksHistory response) {
System.out.println(response);
}
});
Name | Type | Description | Notes |
---|---|---|---|
id | String | 代码片段的ID | |
accessToken | String | 用户授权码 | [optional] |
No authorization required
CodeForks getV5GistsIdForks(id, accessToken, page, perPage)
获取Fork该条代码片段的列表
获取Fork该条代码片段的列表
// Import classes:
//import com.gitee.api.api.GistsApi;
GistsApi apiInstance = new ApiClient().create(GistsApi.class);
String id = "id_example"; // String | 代码片段的ID
String accessToken = "accessToken_example"; // String | 用户授权码
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量
Observable<CodeForks> result = apiInstance.getV5GistsIdForks(id, accessToken, page, perPage);
result.subscribe(new Observer<CodeForks>() {
@Override
public void onCompleted() {
System.out.println("finish!");
}
@Override
public void onError(Throwable throwable) {
System.out.println(throwable);
}
@Override
public void onNext(CodeForks response) {
System.out.println(response);
}
});
Name | Type | Description | Notes |
---|---|---|---|
id | String | 代码片段的ID | |
accessToken | String | 用户授权码 | [optional] |
page | Integer | 当前的页码 | [optional] [default to 1] |
perPage | Integer | 每页的数量 | [optional] [default to 20] |
No authorization required
Void getV5GistsIdStar(id, accessToken)
判断代码片段是否已Star
判断代码片段是否已Star
// Import classes:
//import com.gitee.api.api.GistsApi;
GistsApi apiInstance = new ApiClient().create(GistsApi.class);
String id = "id_example"; // String | 代码片段的ID
String accessToken = "accessToken_example"; // String | 用户授权码
Observable<Void> result = apiInstance.getV5GistsIdStar(id, accessToken);
result.subscribe(new Observer<Void>() {
@Override
public void onCompleted() {
System.out.println("finish!");
}
@Override
public void onError(Throwable throwable) {
System.out.println(throwable);
}
@Override
public void onNext(Void response) {
System.out.println(response);
}
});
Name | Type | Description | Notes |
---|---|---|---|
id | String | 代码片段的ID | |
accessToken | String | 用户授权码 | [optional] |
No authorization required
java.util.List<Code> getV5GistsPublic(accessToken, since, page, perPage)
获取公开的代码片段
获取公开的代码片段
// Import classes:
//import com.gitee.api.api.GistsApi;
GistsApi apiInstance = new ApiClient().create(GistsApi.class);
String accessToken = "accessToken_example"; // String | 用户授权码
String since = "since_example"; // String | 起始的更新时间,要求时间格式为 ISO 8601
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量
Observable<java.util.List<Code>> result = apiInstance.getV5GistsPublic(accessToken, since, page, perPage);
result.subscribe(new Observer<java.util.List<Code>>() {
@Override
public void onCompleted() {
System.out.println("finish!");
}
@Override
public void onError(Throwable throwable) {
System.out.println(throwable);
}
@Override
public void onNext(java.util.List<Code> response) {
System.out.println(response);
}
});
Name | Type | Description | Notes |
---|---|---|---|
accessToken | String | 用户授权码 | [optional] |
since | String | 起始的更新时间,要求时间格式为 ISO 8601 | [optional] |
page | Integer | 当前的页码 | [optional] [default to 1] |
perPage | Integer | 每页的数量 | [optional] [default to 20] |
No authorization required
java.util.List<Code> getV5GistsStarred(accessToken, since, page, perPage)
获取用户Star的代码片段
获取用户Star的代码片段
// Import classes:
//import com.gitee.api.api.GistsApi;
GistsApi apiInstance = new ApiClient().create(GistsApi.class);
String accessToken = "accessToken_example"; // String | 用户授权码
String since = "since_example"; // String | 起始的更新时间,要求时间格式为 ISO 8601
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量
Observable<java.util.List<Code>> result = apiInstance.getV5GistsStarred(accessToken, since, page, perPage);
result.subscribe(new Observer<java.util.List<Code>>() {
@Override
public void onCompleted() {
System.out.println("finish!");
}
@Override
public void onError(Throwable throwable) {
System.out.println(throwable);
}
@Override
public void onNext(java.util.List<Code> response) {
System.out.println(response);
}
});
Name | Type | Description | Notes |
---|---|---|---|
accessToken | String | 用户授权码 | [optional] |
since | String | 起始的更新时间,要求时间格式为 ISO 8601 | [optional] |
page | Integer | 当前的页码 | [optional] [default to 1] |
perPage | Integer | 每页的数量 | [optional] [default to 20] |
No authorization required
java.util.List<Code> getV5UsersUsernameGists(username, accessToken, page, perPage)
获取指定用户的公开代码片段
获取指定用户的公开代码片段
// Import classes:
//import com.gitee.api.api.GistsApi;
GistsApi apiInstance = new ApiClient().create(GistsApi.class);
String username = "username_example"; // String | 用户名(username/login)
String accessToken = "accessToken_example"; // String | 用户授权码
Integer page = 1; // Integer | 当前的页码
Integer perPage = 20; // Integer | 每页的数量
Observable<java.util.List<Code>> result = apiInstance.getV5UsersUsernameGists(username, accessToken, page, perPage);
result.subscribe(new Observer<java.util.List<Code>>() {
@Override
public void onCompleted() {
System.out.println("finish!");
}
@Override
public void onError(Throwable throwable) {
System.out.println(throwable);
}
@Override
public void onNext(java.util.List<Code> response) {
System.out.println(response);
}
});
Name | Type | Description | Notes |
---|---|---|---|
username | String | 用户名(username/login) | |
accessToken | String | 用户授权码 | [optional] |
page | Integer | 当前的页码 | [optional] [default to 1] |
perPage | Integer | 每页的数量 | [optional] [default to 20] |
No authorization required
CodeComment patchV5GistsGistIdCommentsId(gistId, id, body, accessToken)
修改代码片段的评论
修改代码片段的评论
// Import classes:
//import com.gitee.api.api.GistsApi;
GistsApi apiInstance = new ApiClient().create(GistsApi.class);
String gistId = "gistId_example"; // String | 代码片段的ID
Integer id = 56; // Integer | 评论的ID
String body = "body_example"; // String | 评论内容
String accessToken = "accessToken_example"; // String | 用户授权码
Observable<CodeComment> result = apiInstance.patchV5GistsGistIdCommentsId(gistId, id, body, accessToken);
result.subscribe(new Observer<CodeComment>() {
@Override
public void onCompleted() {
System.out.println("finish!");
}
@Override
public void onError(Throwable throwable) {
System.out.println(throwable);
}
@Override
public void onNext(CodeComment response) {
System.out.println(response);
}
});
Name | Type | Description | Notes |
---|---|---|---|
gistId | String | 代码片段的ID | |
id | Integer | 评论的ID | |
body | String | 评论内容 | |
accessToken | String | 用户授权码 | [optional] |
No authorization required
CodeForksHistory patchV5GistsId(id, files, description, accessToken, _public)
修改代码片段
修改代码片段
// Import classes:
//import com.gitee.api.api.GistsApi;
GistsApi apiInstance = new ApiClient().create(GistsApi.class);
String id = "id_example"; // String | 代码片段的ID
java.util.Map<String, String> files = new HashMap(); // java.util.Map<String, String> | Hash形式的代码片段文件名以及文件内容。如: { \"file1.txt\": { \"content\": \"String file contents\" } }
String description = "description_example"; // String | 代码片段描述,1~30个字符
String accessToken = "accessToken_example"; // String | 用户授权码
Boolean _public = true; // Boolean | 公开/私有,默认: 私有
Observable<CodeForksHistory> result = apiInstance.patchV5GistsId(id, files, description, accessToken, _public);
result.subscribe(new Observer<CodeForksHistory>() {
@Override
public void onCompleted() {
System.out.println("finish!");
}
@Override
public void onError(Throwable throwable) {
System.out.println(throwable);
}
@Override
public void onNext(CodeForksHistory response) {
System.out.println(response);
}
});
Name | Type | Description | Notes |
---|---|---|---|
id | String | 代码片段的ID | |
files | java.util.Map<String, String> | Hash形式的代码片段文件名以及文件内容。如: { "file1.txt": { "content": "String file contents" } } | |
description | String | 代码片段描述,1~30个字符 | |
accessToken | String | 用户授权码 | [optional] |
_public | Boolean | 公开/私有,默认: 私有 | [optional] |
No authorization required
java.util.List<CodeForksHistory> postV5Gists(files, description, accessToken, _public)
创建代码片段
创建代码片段
// Import classes:
//import com.gitee.api.api.GistsApi;
GistsApi apiInstance = new ApiClient().create(GistsApi.class);
java.util.Map<String, String> files = new HashMap(); // java.util.Map<String, String> | Hash形式的代码片段文件名以及文件内容。如: { \"file1.txt\": { \"content\": \"String file contents\" } }
String description = "description_example"; // String | 代码片段描述,1~30个字符
String accessToken = "accessToken_example"; // String | 用户授权码
Boolean _public = true; // Boolean | 公开/私有,默认: 私有
Observable<java.util.List<CodeForksHistory>> result = apiInstance.postV5Gists(files, description, accessToken, _public);
result.subscribe(new Observer<java.util.List<CodeForksHistory>>() {
@Override
public void onCompleted() {
System.out.println("finish!");
}
@Override
public void onError(Throwable throwable) {
System.out.println(throwable);
}
@Override
public void onNext(java.util.List<CodeForksHistory> response) {
System.out.println(response);
}
});
Name | Type | Description | Notes |
---|---|---|---|
files | java.util.Map<String, String> | Hash形式的代码片段文件名以及文件内容。如: { "file1.txt": { "content": "String file contents" } } | |
description | String | 代码片段描述,1~30个字符 | |
accessToken | String | 用户授权码 | [optional] |
_public | Boolean | 公开/私有,默认: 私有 | [optional] |
java.util.List<CodeForksHistory>
No authorization required
CodeComment postV5GistsGistIdComments(gistId, body, accessToken)
增加代码片段的评论
增加代码片段的评论
// Import classes:
//import com.gitee.api.api.GistsApi;
GistsApi apiInstance = new ApiClient().create(GistsApi.class);
String gistId = "gistId_example"; // String | 代码片段的ID
String body = "body_example"; // String | 评论内容
String accessToken = "accessToken_example"; // String | 用户授权码
Observable<CodeComment> result = apiInstance.postV5GistsGistIdComments(gistId, body, accessToken);
result.subscribe(new Observer<CodeComment>() {
@Override
public void onCompleted() {
System.out.println("finish!");
}
@Override
public void onError(Throwable throwable) {
System.out.println(throwable);
}
@Override
public void onNext(CodeComment response) {
System.out.println(response);
}
});
Name | Type | Description | Notes |
---|---|---|---|
gistId | String | 代码片段的ID | |
body | String | 评论内容 | |
accessToken | String | 用户授权码 | [optional] |
No authorization required
Void postV5GistsIdForks(id, accessToken)
Fork代码片段
Fork代码片段
// Import classes:
//import com.gitee.api.api.GistsApi;
GistsApi apiInstance = new ApiClient().create(GistsApi.class);
String id = "id_example"; // String | 代码片段的ID
String accessToken = "accessToken_example"; // String | 用户授权码
Observable<Void> result = apiInstance.postV5GistsIdForks(id, accessToken);
result.subscribe(new Observer<Void>() {
@Override
public void onCompleted() {
System.out.println("finish!");
}
@Override
public void onError(Throwable throwable) {
System.out.println(throwable);
}
@Override
public void onNext(Void response) {
System.out.println(response);
}
});
Name | Type | Description | Notes |
---|---|---|---|
id | String | 代码片段的ID | |
accessToken | String | 用户授权码 | [optional] |
No authorization required
Void putV5GistsIdStar(id, accessToken)
Star代码片段
Star代码片段
// Import classes:
//import com.gitee.api.api.GistsApi;
GistsApi apiInstance = new ApiClient().create(GistsApi.class);
String id = "id_example"; // String | 代码片段的ID
String accessToken = "accessToken_example"; // String | 用户授权码
Observable<Void> result = apiInstance.putV5GistsIdStar(id, accessToken);
result.subscribe(new Observer<Void>() {
@Override
public void onCompleted() {
System.out.println("finish!");
}
@Override
public void onError(Throwable throwable) {
System.out.println(throwable);
}
@Override
public void onNext(Void response) {
System.out.println(response);
}
});
Name | Type | Description | Notes |
---|---|---|---|
id | String | 代码片段的ID | |
accessToken | String | 用户授权码 | [optional] |
No authorization required
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。