mirror of
https://codeberg.org/gitnex/tea4j-autodeploy
synced 2026-06-22 09:10:37 +00:00
Synchronizing API and documentation updates
This commit is contained in:
+111
-9
@@ -105,8 +105,9 @@ Method | HTTP request | Description
|
||||
[**repoGetByID**](RepositoryApi.md#repoGetByID) | **GET** repositories/{id} | Get a repository by id
|
||||
[**repoGetCombinedStatusByRef**](RepositoryApi.md#repoGetCombinedStatusByRef) | **GET** repos/{owner}/{repo}/commits/{ref}/status | Get a commit's combined status, by branch/tag/commit reference
|
||||
[**repoGetCommitPullRequest**](RepositoryApi.md#repoGetCommitPullRequest) | **GET** repos/{owner}/{repo}/commits/{sha}/pull | Get the merged pull request of the commit
|
||||
[**repoGetContents**](RepositoryApi.md#repoGetContents) | **GET** repos/{owner}/{repo}/contents/{filepath} | Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir
|
||||
[**repoGetContentsList**](RepositoryApi.md#repoGetContentsList) | **GET** repos/{owner}/{repo}/contents | Gets the metadata of all the entries of the root dir
|
||||
[**repoGetContents**](RepositoryApi.md#repoGetContents) | **GET** repos/{owner}/{repo}/contents/{filepath} | Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir.
|
||||
[**repoGetContentsExt**](RepositoryApi.md#repoGetContentsExt) | **GET** repos/{owner}/{repo}/contents-ext/{filepath} | The extended \"contents\" API, to get file metadata and/or content, or list a directory.
|
||||
[**repoGetContentsList**](RepositoryApi.md#repoGetContentsList) | **GET** repos/{owner}/{repo}/contents | Gets the metadata of all the entries of the root dir.
|
||||
[**repoGetEditorConfig**](RepositoryApi.md#repoGetEditorConfig) | **GET** repos/{owner}/{repo}/editorconfig/{filepath} | Get the EditorConfig definitions of a file in a repository
|
||||
[**repoGetFileContents**](RepositoryApi.md#repoGetFileContents) | **GET** repos/{owner}/{repo}/file-contents | Get the metadata and contents of requested files
|
||||
[**repoGetFileContentsPost**](RepositoryApi.md#repoGetFileContentsPost) | **POST** repos/{owner}/{repo}/file-contents | Get the metadata and contents of requested files
|
||||
@@ -9571,7 +9572,9 @@ Name | Type | Description | Notes
|
||||
# **repoGetContents**
|
||||
> ContentsResponse repoGetContents(owner, repo, filepath, ref)
|
||||
|
||||
Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir
|
||||
Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir.
|
||||
|
||||
This API follows GitHub's design, and it is not easy to use. Recommend users to use the \"contents-ext\" API instead.
|
||||
|
||||
### Example
|
||||
```java
|
||||
@@ -9655,6 +9658,103 @@ Name | Type | Description | Notes
|
||||
|
||||
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="repoGetContentsExt"></a>
|
||||
# **repoGetContentsExt**
|
||||
> ContentsExtResponse repoGetContentsExt(owner, repo, filepath, ref, includes)
|
||||
|
||||
The extended \"contents\" API, to get file metadata and/or content, or list a directory.
|
||||
|
||||
It guarantees that only one of the response fields is set if the request succeeds. Users can pass \"includes=file_content\" or \"includes=lfs_metadata\" to retrieve more fields. \"includes=file_content\" only works for single file, if you need to retrieve file contents in batch, use \"file-contents\" API after listing the directory.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import org.gitnex.tea4j.v2.ApiClient;
|
||||
//import org.gitnex.tea4j.v2.ApiException;
|
||||
//import org.gitnex.tea4j.v2.Configuration;
|
||||
//import org.gitnex.tea4j.v2.auth.*;
|
||||
//import org.gitnex.tea4j.v2.apis.RepositoryApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure API key authorization: AccessToken
|
||||
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
|
||||
AccessToken.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//AccessToken.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: AuthorizationHeaderToken
|
||||
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
|
||||
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
|
||||
// Configure HTTP basic authorization: BasicAuth
|
||||
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
|
||||
BasicAuth.setUsername("YOUR USERNAME");
|
||||
BasicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: SudoHeader
|
||||
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
|
||||
SudoHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//SudoHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: SudoParam
|
||||
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
|
||||
SudoParam.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//SudoParam.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: TOTPHeader
|
||||
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
|
||||
TOTPHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//TOTPHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: Token
|
||||
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
|
||||
Token.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//Token.setApiKeyPrefix("Token");
|
||||
|
||||
RepositoryApi apiInstance = new RepositoryApi();
|
||||
String owner = "owner_example"; // String | owner of the repo
|
||||
String repo = "repo_example"; // String | name of the repo
|
||||
String filepath = "filepath_example"; // String | path of the dir, file, symlink or submodule in the repo
|
||||
String ref = "ref_example"; // String | the name of the commit/branch/tag, default to the repository’s default branch.
|
||||
String includes = "includes_example"; // String | By default this API's response only contains file's metadata. Use comma-separated \"includes\" options to retrieve more fields. Option \"file_content\" will try to retrieve the file content, option \"lfs_metadata\" will try to retrieve LFS metadata.
|
||||
try {
|
||||
ContentsExtResponse result = apiInstance.repoGetContentsExt(owner, repo, filepath, ref, includes);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling RepositoryApi#repoGetContentsExt");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**owner** | **String**| owner of the repo |
|
||||
**repo** | **String**| name of the repo |
|
||||
**filepath** | **String**| path of the dir, file, symlink or submodule in the repo |
|
||||
**ref** | **String**| the name of the commit/branch/tag, default to the repository’s default branch. | [optional]
|
||||
**includes** | **String**| By default this API's response only contains file's metadata. Use comma-separated \"includes\" options to retrieve more fields. Option \"file_content\" will try to retrieve the file content, option \"lfs_metadata\" will try to retrieve LFS metadata. | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ContentsExtResponse**](ContentsExtResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
@@ -9664,7 +9764,9 @@ Name | Type | Description | Notes
|
||||
# **repoGetContentsList**
|
||||
> List<ContentsResponse> repoGetContentsList(owner, repo, ref)
|
||||
|
||||
Gets the metadata of all the entries of the root dir
|
||||
Gets the metadata of all the entries of the root dir.
|
||||
|
||||
This API follows GitHub's design, and it is not easy to use. Recommend users to use our \"contents-ext\" API instead.
|
||||
|
||||
### Example
|
||||
```java
|
||||
@@ -9850,7 +9952,7 @@ Name | Type | Description | Notes
|
||||
|
||||
Get the metadata and contents of requested files
|
||||
|
||||
See the POST method. This GET method supports to use JSON encoded request body in query parameter.
|
||||
See the POST method. This GET method supports using JSON encoded request body in query parameter.
|
||||
|
||||
### Example
|
||||
```java
|
||||
@@ -11567,7 +11669,7 @@ RepositoryApi apiInstance = new RepositoryApi();
|
||||
String owner = "owner_example"; // String | owner of the repo
|
||||
String repo = "repo_example"; // String | name of the repo
|
||||
String filepath = "filepath_example"; // String | path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch
|
||||
String ref = "ref_example"; // String | The name of the commit/branch/tag. Default the repository’s default branch
|
||||
String ref = "ref_example"; // String | The name of the commit/branch/tag. Default to the repository’s default branch
|
||||
try {
|
||||
File result = apiInstance.repoGetRawFile(owner, repo, filepath, ref);
|
||||
System.out.println(result);
|
||||
@@ -11584,7 +11686,7 @@ Name | Type | Description | Notes
|
||||
**owner** | **String**| owner of the repo |
|
||||
**repo** | **String**| name of the repo |
|
||||
**filepath** | **String**| path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch |
|
||||
**ref** | **String**| The name of the commit/branch/tag. Default the repository’s default branch | [optional]
|
||||
**ref** | **String**| The name of the commit/branch/tag. Default to the repository’s default branch | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -11660,7 +11762,7 @@ RepositoryApi apiInstance = new RepositoryApi();
|
||||
String owner = "owner_example"; // String | owner of the repo
|
||||
String repo = "repo_example"; // String | name of the repo
|
||||
String filepath = "filepath_example"; // String | path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch
|
||||
String ref = "ref_example"; // String | The name of the commit/branch/tag. Default the repository’s default branch
|
||||
String ref = "ref_example"; // String | The name of the commit/branch/tag. Default to the repository’s default branch
|
||||
try {
|
||||
File result = apiInstance.repoGetRawFileOrLFS(owner, repo, filepath, ref);
|
||||
System.out.println(result);
|
||||
@@ -11677,7 +11779,7 @@ Name | Type | Description | Notes
|
||||
**owner** | **String**| owner of the repo |
|
||||
**repo** | **String**| name of the repo |
|
||||
**filepath** | **String**| path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch |
|
||||
**ref** | **String**| The name of the commit/branch/tag. Default the repository’s default branch | [optional]
|
||||
**ref** | **String**| The name of the commit/branch/tag. Default to the repository’s default branch | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
Reference in New Issue
Block a user