diff --git a/docs/Comment.md b/docs/Comment.md index 31ad569..da5ab6e 100644 --- a/docs/Comment.md +++ b/docs/Comment.md @@ -3,6 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**assets** | [**List<Attachment>**](Attachment.md) | | [optional] **body** | **String** | | [optional] **createdAt** | [**Date**](Date.md) | | [optional] **htmlUrl** | **String** | | [optional] diff --git a/docs/IdAssetsBody1.md b/docs/IdAssetsBody1.md new file mode 100644 index 0000000..6070ed1 --- /dev/null +++ b/docs/IdAssetsBody1.md @@ -0,0 +1,6 @@ +# IdAssetsBody1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attachment** | [**File**](File.md) | attachment to upload | diff --git a/docs/IndexAssetsBody.md b/docs/IndexAssetsBody.md new file mode 100644 index 0000000..e63c8fb --- /dev/null +++ b/docs/IndexAssetsBody.md @@ -0,0 +1,6 @@ +# IndexAssetsBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attachment** | [**File**](File.md) | attachment to upload | diff --git a/docs/Issue.md b/docs/Issue.md index 9f088a0..00b10be 100644 --- a/docs/Issue.md +++ b/docs/Issue.md @@ -3,6 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**assets** | [**List<Attachment>**](Attachment.md) | | [optional] **assignee** | [**User**](User.md) | | [optional] **assignees** | [**List<User>**](User.md) | | [optional] **body** | **String** | | [optional] diff --git a/docs/IssueApi.md b/docs/IssueApi.md index 02b1289..7023b08 100644 --- a/docs/IssueApi.md +++ b/docs/IssueApi.md @@ -11,12 +11,16 @@ Method | HTTP request | Description [**issueClearLabels**](IssueApi.md#issueClearLabels) | **DELETE** repos/{owner}/{repo}/issues/{index}/labels | Remove all labels from an issue [**issueCreateComment**](IssueApi.md#issueCreateComment) | **POST** repos/{owner}/{repo}/issues/{index}/comments | Add a comment to an issue [**issueCreateIssue**](IssueApi.md#issueCreateIssue) | **POST** repos/{owner}/{repo}/issues | Create an issue. If using deadline only the date will be taken into account, and time of day ignored. +[**issueCreateIssueAttachment**](IssueApi.md#issueCreateIssueAttachment) | **POST** repos/{owner}/{repo}/issues/{index}/assets | Create an issue attachment +[**issueCreateIssueCommentAttachment**](IssueApi.md#issueCreateIssueCommentAttachment) | **POST** repos/{owner}/{repo}/issues/comments/{id}/assets | Create a comment attachment [**issueCreateLabel**](IssueApi.md#issueCreateLabel) | **POST** repos/{owner}/{repo}/labels | Create a label [**issueCreateMilestone**](IssueApi.md#issueCreateMilestone) | **POST** repos/{owner}/{repo}/milestones | Create a milestone [**issueDelete**](IssueApi.md#issueDelete) | **DELETE** repos/{owner}/{repo}/issues/{index} | Delete an issue [**issueDeleteComment**](IssueApi.md#issueDeleteComment) | **DELETE** repos/{owner}/{repo}/issues/comments/{id} | Delete a comment [**issueDeleteCommentDeprecated**](IssueApi.md#issueDeleteCommentDeprecated) | **DELETE** repos/{owner}/{repo}/issues/{index}/comments/{id} | Delete a comment [**issueDeleteCommentReaction**](IssueApi.md#issueDeleteCommentReaction) | **DELETE** repos/{owner}/{repo}/issues/comments/{id}/reactions | Remove a reaction from a comment of an issue +[**issueDeleteIssueAttachment**](IssueApi.md#issueDeleteIssueAttachment) | **DELETE** repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Delete an issue attachment +[**issueDeleteIssueCommentAttachment**](IssueApi.md#issueDeleteIssueCommentAttachment) | **DELETE** repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Delete a comment attachment [**issueDeleteIssueReaction**](IssueApi.md#issueDeleteIssueReaction) | **DELETE** repos/{owner}/{repo}/issues/{index}/reactions | Remove a reaction from an issue [**issueDeleteLabel**](IssueApi.md#issueDeleteLabel) | **DELETE** repos/{owner}/{repo}/labels/{id} | Delete a label [**issueDeleteMilestone**](IssueApi.md#issueDeleteMilestone) | **DELETE** repos/{owner}/{repo}/milestones/{id} | Delete a milestone @@ -26,6 +30,8 @@ Method | HTTP request | Description [**issueEditComment**](IssueApi.md#issueEditComment) | **PATCH** repos/{owner}/{repo}/issues/comments/{id} | Edit a comment [**issueEditCommentDeprecated**](IssueApi.md#issueEditCommentDeprecated) | **PATCH** repos/{owner}/{repo}/issues/{index}/comments/{id} | Edit a comment [**issueEditIssue**](IssueApi.md#issueEditIssue) | **PATCH** repos/{owner}/{repo}/issues/{index} | Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. +[**issueEditIssueAttachment**](IssueApi.md#issueEditIssueAttachment) | **PATCH** repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Edit an issue attachment +[**issueEditIssueCommentAttachment**](IssueApi.md#issueEditIssueCommentAttachment) | **PATCH** repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Edit a comment attachment [**issueEditIssueDeadline**](IssueApi.md#issueEditIssueDeadline) | **POST** repos/{owner}/{repo}/issues/{index}/deadline | Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. [**issueEditLabel**](IssueApi.md#issueEditLabel) | **PATCH** repos/{owner}/{repo}/labels/{id} | Update a label [**issueEditMilestone**](IssueApi.md#issueEditMilestone) | **PATCH** repos/{owner}/{repo}/milestones/{id} | Update a milestone @@ -34,12 +40,16 @@ Method | HTTP request | Description [**issueGetComments**](IssueApi.md#issueGetComments) | **GET** repos/{owner}/{repo}/issues/{index}/comments | List all comments on an issue [**issueGetCommentsAndTimeline**](IssueApi.md#issueGetCommentsAndTimeline) | **GET** repos/{owner}/{repo}/issues/{index}/timeline | List all comments and events on an issue [**issueGetIssue**](IssueApi.md#issueGetIssue) | **GET** repos/{owner}/{repo}/issues/{index} | Get an issue +[**issueGetIssueAttachment**](IssueApi.md#issueGetIssueAttachment) | **GET** repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Get an issue attachment +[**issueGetIssueCommentAttachment**](IssueApi.md#issueGetIssueCommentAttachment) | **GET** repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Get a comment attachment [**issueGetIssueReactions**](IssueApi.md#issueGetIssueReactions) | **GET** repos/{owner}/{repo}/issues/{index}/reactions | Get a list reactions of an issue [**issueGetLabel**](IssueApi.md#issueGetLabel) | **GET** repos/{owner}/{repo}/labels/{id} | Get a single label [**issueGetLabels**](IssueApi.md#issueGetLabels) | **GET** repos/{owner}/{repo}/issues/{index}/labels | Get an issue's labels [**issueGetMilestone**](IssueApi.md#issueGetMilestone) | **GET** repos/{owner}/{repo}/milestones/{id} | Get a milestone [**issueGetMilestonesList**](IssueApi.md#issueGetMilestonesList) | **GET** repos/{owner}/{repo}/milestones | Get all of a repository's opened milestones [**issueGetRepoComments**](IssueApi.md#issueGetRepoComments) | **GET** repos/{owner}/{repo}/issues/comments | List all comments in a repository +[**issueListIssueAttachments**](IssueApi.md#issueListIssueAttachments) | **GET** repos/{owner}/{repo}/issues/{index}/assets | List issue's attachments +[**issueListIssueCommentAttachments**](IssueApi.md#issueListIssueCommentAttachments) | **GET** repos/{owner}/{repo}/issues/comments/{id}/assets | List comment's attachments [**issueListIssues**](IssueApi.md#issueListIssues) | **GET** repos/{owner}/{repo}/issues | List a repository's issues [**issueListLabels**](IssueApi.md#issueListLabels) | **GET** repos/{owner}/{repo}/labels | Get all of a repository's labels [**issuePostCommentReaction**](IssueApi.md#issuePostCommentReaction) | **POST** repos/{owner}/{repo}/issues/comments/{id}/reactions | Add a reaction to a comment of an issue @@ -698,6 +708,196 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json + +# **issueCreateIssueAttachment** +> Attachment issueCreateIssueAttachment(attachment, owner, repo, index, name) + +Create an issue attachment + +### 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.IssueApi; + +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"); + +IssueApi apiInstance = new IssueApi(); +File attachment = new File("attachment_example"); // File | +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +Long index = 789L; // Long | index of the issue +String name = "name_example"; // String | name of the attachment +try { + Attachment result = apiInstance.issueCreateIssueAttachment(attachment, owner, repo, index, name); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueCreateIssueAttachment"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attachment** | **File**| | + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **index** | **Long**| index of the issue | + **name** | **String**| name of the attachment | [optional] + +### Return type + +[**Attachment**](Attachment.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**: multipart/form-data + - **Accept**: application/json + + +# **issueCreateIssueCommentAttachment** +> Attachment issueCreateIssueCommentAttachment(attachment, owner, repo, id, name) + +Create a comment attachment + +### 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.IssueApi; + +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"); + +IssueApi apiInstance = new IssueApi(); +File attachment = new File("attachment_example"); // File | +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +Long id = 789L; // Long | id of the comment +String name = "name_example"; // String | name of the attachment +try { + Attachment result = apiInstance.issueCreateIssueCommentAttachment(attachment, owner, repo, id, name); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueCreateIssueCommentAttachment"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attachment** | **File**| | + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **id** | **Long**| id of the comment | + **name** | **String**| name of the attachment | [optional] + +### Return type + +[**Attachment**](Attachment.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**: multipart/form-data + - **Accept**: application/json + # **issueCreateLabel** > Label issueCreateLabel(owner, repo, body) @@ -1248,6 +1448,192 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: Not defined + +# **issueDeleteIssueAttachment** +> Void issueDeleteIssueAttachment(owner, repo, index, attachmentId) + +Delete an issue attachment + +### 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.IssueApi; + +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"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +Long index = 789L; // Long | index of the issue +Long attachmentId = 789L; // Long | id of the attachment to delete +try { + Void result = apiInstance.issueDeleteIssueAttachment(owner, repo, index, attachmentId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueDeleteIssueAttachment"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **index** | **Long**| index of the issue | + **attachmentId** | **Long**| id of the attachment to delete | + +### Return type + +[**Void**](.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 + - **Accept**: Not defined + + +# **issueDeleteIssueCommentAttachment** +> Void issueDeleteIssueCommentAttachment(owner, repo, id, attachmentId) + +Delete a comment attachment + +### 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.IssueApi; + +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"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +Long id = 789L; // Long | id of the comment +Long attachmentId = 789L; // Long | id of the attachment to delete +try { + Void result = apiInstance.issueDeleteIssueCommentAttachment(owner, repo, id, attachmentId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueDeleteIssueCommentAttachment"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **id** | **Long**| id of the comment | + **attachmentId** | **Long**| id of the attachment to delete | + +### Return type + +[**Void**](.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 + - **Accept**: Not defined + # **issueDeleteIssueReaction** > Void issueDeleteIssueReaction(owner, repo, index, body) @@ -2076,6 +2462,196 @@ 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**: application/json + - **Accept**: application/json + + +# **issueEditIssueAttachment** +> Attachment issueEditIssueAttachment(owner, repo, index, attachmentId, body) + +Edit an issue attachment + +### 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.IssueApi; + +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"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +Long index = 789L; // Long | index of the issue +Long attachmentId = 789L; // Long | id of the attachment to edit +EditAttachmentOptions body = new EditAttachmentOptions(); // EditAttachmentOptions | +try { + Attachment result = apiInstance.issueEditIssueAttachment(owner, repo, index, attachmentId, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueEditIssueAttachment"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **index** | **Long**| index of the issue | + **attachmentId** | **Long**| id of the attachment to edit | + **body** | [**EditAttachmentOptions**](EditAttachmentOptions.md)| | [optional] + +### Return type + +[**Attachment**](Attachment.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**: application/json + - **Accept**: application/json + + +# **issueEditIssueCommentAttachment** +> Attachment issueEditIssueCommentAttachment(owner, repo, id, attachmentId, body) + +Edit a comment attachment + +### 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.IssueApi; + +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"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +Long id = 789L; // Long | id of the comment +Long attachmentId = 789L; // Long | id of the attachment to edit +EditAttachmentOptions body = new EditAttachmentOptions(); // EditAttachmentOptions | +try { + Attachment result = apiInstance.issueEditIssueCommentAttachment(owner, repo, id, attachmentId, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueEditIssueCommentAttachment"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **id** | **Long**| id of the comment | + **attachmentId** | **Long**| id of the attachment to edit | + **body** | [**EditAttachmentOptions**](EditAttachmentOptions.md)| | [optional] + +### Return type + +[**Attachment**](Attachment.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**: application/json @@ -2822,6 +3398,192 @@ 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 + + +# **issueGetIssueAttachment** +> Attachment issueGetIssueAttachment(owner, repo, index, attachmentId) + +Get an issue attachment + +### 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.IssueApi; + +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"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +Long index = 789L; // Long | index of the issue +Long attachmentId = 789L; // Long | id of the attachment to get +try { + Attachment result = apiInstance.issueGetIssueAttachment(owner, repo, index, attachmentId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueGetIssueAttachment"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **index** | **Long**| index of the issue | + **attachmentId** | **Long**| id of the attachment to get | + +### Return type + +[**Attachment**](Attachment.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 + - **Accept**: application/json + + +# **issueGetIssueCommentAttachment** +> Attachment issueGetIssueCommentAttachment(owner, repo, id, attachmentId) + +Get a comment attachment + +### 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.IssueApi; + +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"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +Long id = 789L; // Long | id of the comment +Long attachmentId = 789L; // Long | id of the attachment to get +try { + Attachment result = apiInstance.issueGetIssueCommentAttachment(owner, repo, id, attachmentId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueGetIssueCommentAttachment"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **id** | **Long**| id of the comment | + **attachmentId** | **Long**| id of the attachment to get | + +### Return type + +[**Attachment**](Attachment.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 @@ -3384,6 +4146,188 @@ 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 + + +# **issueListIssueAttachments** +> List<Attachment> issueListIssueAttachments(owner, repo, index) + +List issue's attachments + +### 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.IssueApi; + +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"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +Long index = 789L; // Long | index of the issue +try { + List result = apiInstance.issueListIssueAttachments(owner, repo, index); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueListIssueAttachments"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **index** | **Long**| index of the issue | + +### Return type + +[**List<Attachment>**](Attachment.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 + - **Accept**: application/json + + +# **issueListIssueCommentAttachments** +> List<Attachment> issueListIssueCommentAttachments(owner, repo, id) + +List comment's attachments + +### 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.IssueApi; + +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"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +Long id = 789L; // Long | id of the comment +try { + List result = apiInstance.issueListIssueCommentAttachments(owner, repo, id); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueListIssueCommentAttachments"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **id** | **Long**| id of the comment | + +### Return type + +[**List<Attachment>**](Attachment.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 diff --git a/src/main/java/org/gitnex/tea4j/v2/apis/IssueApi.java b/src/main/java/org/gitnex/tea4j/v2/apis/IssueApi.java index 8edc277..c96162b 100644 --- a/src/main/java/org/gitnex/tea4j/v2/apis/IssueApi.java +++ b/src/main/java/org/gitnex/tea4j/v2/apis/IssueApi.java @@ -2,13 +2,16 @@ package org.gitnex.tea4j.v2.apis; import java.util.Date; import java.util.List; +import okhttp3.RequestBody; import org.gitnex.tea4j.v2.CollectionFormats.*; import org.gitnex.tea4j.v2.models.AddTimeOption; +import org.gitnex.tea4j.v2.models.Attachment; import org.gitnex.tea4j.v2.models.Comment; import org.gitnex.tea4j.v2.models.CreateIssueCommentOption; import org.gitnex.tea4j.v2.models.CreateIssueOption; import org.gitnex.tea4j.v2.models.CreateLabelOption; import org.gitnex.tea4j.v2.models.CreateMilestoneOption; +import org.gitnex.tea4j.v2.models.EditAttachmentOptions; import org.gitnex.tea4j.v2.models.EditDeadlineOption; import org.gitnex.tea4j.v2.models.EditIssueCommentOption; import org.gitnex.tea4j.v2.models.EditIssueOption; @@ -140,6 +143,44 @@ public interface IssueApi { @retrofit2.http.Path("repo") String repo, @retrofit2.http.Body CreateIssueOption body); + /** + * Create an issue attachment + * + * @param attachment (required) + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param name name of the attachment (optional) + * @return Call<Attachment> + */ + @retrofit2.http.Multipart + @POST("repos/{owner}/{repo}/issues/{index}/assets") + Call issueCreateIssueAttachment( + @retrofit2.http.Part("attachment\"; filename=\"attachment") RequestBody attachment, + @retrofit2.http.Path("owner") String owner, + @retrofit2.http.Path("repo") String repo, + @retrofit2.http.Path("index") Long index, + @retrofit2.http.Query("name") String name); + + /** + * Create a comment attachment + * + * @param attachment (required) + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @param name name of the attachment (optional) + * @return Call<Attachment> + */ + @retrofit2.http.Multipart + @POST("repos/{owner}/{repo}/issues/comments/{id}/assets") + Call issueCreateIssueCommentAttachment( + @retrofit2.http.Part("attachment\"; filename=\"attachment") RequestBody attachment, + @retrofit2.http.Path("owner") String owner, + @retrofit2.http.Path("repo") String repo, + @retrofit2.http.Path("id") Long id, + @retrofit2.http.Query("name") String name); + /** * Create a label * @@ -231,6 +272,38 @@ public interface IssueApi { @retrofit2.http.Path("id") Long id, @retrofit2.http.Body EditReactionOption body); + /** + * Delete an issue attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param attachmentId id of the attachment to delete (required) + * @return Call<Void> + */ + @DELETE("repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}") + Call issueDeleteIssueAttachment( + @retrofit2.http.Path("owner") String owner, + @retrofit2.http.Path("repo") String repo, + @retrofit2.http.Path("index") Long index, + @retrofit2.http.Path("attachment_id") Long attachmentId); + + /** + * Delete a comment attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @param attachmentId id of the attachment to delete (required) + * @return Call<Void> + */ + @DELETE("repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}") + Call issueDeleteIssueCommentAttachment( + @retrofit2.http.Path("owner") String owner, + @retrofit2.http.Path("repo") String repo, + @retrofit2.http.Path("id") Long id, + @retrofit2.http.Path("attachment_id") Long attachmentId); + /** * Remove a reaction from an issue * @@ -376,6 +449,44 @@ public interface IssueApi { @retrofit2.http.Path("index") Long index, @retrofit2.http.Body EditIssueOption body); + /** + * Edit an issue attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param attachmentId id of the attachment to edit (required) + * @param body (optional) + * @return Call<Attachment> + */ + @Headers({"Content-Type:application/json"}) + @PATCH("repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}") + Call issueEditIssueAttachment( + @retrofit2.http.Path("owner") String owner, + @retrofit2.http.Path("repo") String repo, + @retrofit2.http.Path("index") Long index, + @retrofit2.http.Path("attachment_id") Long attachmentId, + @retrofit2.http.Body EditAttachmentOptions body); + + /** + * Edit a comment attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @param attachmentId id of the attachment to edit (required) + * @param body (optional) + * @return Call<Attachment> + */ + @Headers({"Content-Type:application/json"}) + @PATCH("repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}") + Call issueEditIssueCommentAttachment( + @retrofit2.http.Path("owner") String owner, + @retrofit2.http.Path("repo") String repo, + @retrofit2.http.Path("id") Long id, + @retrofit2.http.Path("attachment_id") Long attachmentId, + @retrofit2.http.Body EditAttachmentOptions body); + /** * Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date * will be taken into account, and time of day ignored. @@ -514,6 +625,38 @@ public interface IssueApi { @retrofit2.http.Path("repo") String repo, @retrofit2.http.Path("index") Long index); + /** + * Get an issue attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param attachmentId id of the attachment to get (required) + * @return Call<Attachment> + */ + @GET("repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}") + Call issueGetIssueAttachment( + @retrofit2.http.Path("owner") String owner, + @retrofit2.http.Path("repo") String repo, + @retrofit2.http.Path("index") Long index, + @retrofit2.http.Path("attachment_id") Long attachmentId); + + /** + * Get a comment attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @param attachmentId id of the attachment to get (required) + * @return Call<Attachment> + */ + @GET("repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}") + Call issueGetIssueCommentAttachment( + @retrofit2.http.Path("owner") String owner, + @retrofit2.http.Path("repo") String repo, + @retrofit2.http.Path("id") Long id, + @retrofit2.http.Path("attachment_id") Long attachmentId); + /** * Get a list reactions of an issue * @@ -617,6 +760,34 @@ public interface IssueApi { @retrofit2.http.Query("page") Integer page, @retrofit2.http.Query("limit") Integer limit); + /** + * List issue's attachments + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @return Call<List<Attachment>> + */ + @GET("repos/{owner}/{repo}/issues/{index}/assets") + Call> issueListIssueAttachments( + @retrofit2.http.Path("owner") String owner, + @retrofit2.http.Path("repo") String repo, + @retrofit2.http.Path("index") Long index); + + /** + * List comment's attachments + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @return Call<List<Attachment>> + */ + @GET("repos/{owner}/{repo}/issues/comments/{id}/assets") + Call> issueListIssueCommentAttachments( + @retrofit2.http.Path("owner") String owner, + @retrofit2.http.Path("repo") String repo, + @retrofit2.http.Path("id") Long id); + /** * List a repository's issues * diff --git a/src/main/java/org/gitnex/tea4j/v2/models/Comment.java b/src/main/java/org/gitnex/tea4j/v2/models/Comment.java index 4023887..fd2e7ea 100644 --- a/src/main/java/org/gitnex/tea4j/v2/models/Comment.java +++ b/src/main/java/org/gitnex/tea4j/v2/models/Comment.java @@ -15,7 +15,9 @@ package org.gitnex.tea4j.v2.models; import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; +import java.util.ArrayList; import java.util.Date; +import java.util.List; import java.util.Objects; /** Comment represents a comment on a commit or issue */ @@ -23,6 +25,9 @@ import java.util.Objects; public class Comment implements Serializable { private static final long serialVersionUID = 1L; + @SerializedName("assets") + private List assets = null; + @SerializedName("body") private String body = null; @@ -53,6 +58,33 @@ public class Comment implements Serializable { @SerializedName("user") private User user = null; + public Comment assets(List assets) { + this.assets = assets; + return this; + } + + public Comment addAssetsItem(Attachment assetsItem) { + if (this.assets == null) { + this.assets = new ArrayList<>(); + } + this.assets.add(assetsItem); + return this; + } + + /** + * Get assets + * + * @return assets + */ + @Schema(description = "") + public List getAssets() { + return assets; + } + + public void setAssets(List assets) { + this.assets = assets; + } + public Comment body(String body) { this.body = body; return this; @@ -252,7 +284,8 @@ public class Comment implements Serializable { return false; } Comment comment = (Comment) o; - return Objects.equals(this.body, comment.body) + return Objects.equals(this.assets, comment.assets) + && Objects.equals(this.body, comment.body) && Objects.equals(this.createdAt, comment.createdAt) && Objects.equals(this.htmlUrl, comment.htmlUrl) && Objects.equals(this.id, comment.id) @@ -267,6 +300,7 @@ public class Comment implements Serializable { @Override public int hashCode() { return Objects.hash( + assets, body, createdAt, htmlUrl, @@ -284,6 +318,7 @@ public class Comment implements Serializable { StringBuilder sb = new StringBuilder(); sb.append("class Comment {\n"); + sb.append(" assets: ").append(toIndentedString(assets)).append("\n"); sb.append(" body: ").append(toIndentedString(body)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n"); diff --git a/src/main/java/org/gitnex/tea4j/v2/models/IdAssetsBody1.java b/src/main/java/org/gitnex/tea4j/v2/models/IdAssetsBody1.java new file mode 100644 index 0000000..33d73a2 --- /dev/null +++ b/src/main/java/org/gitnex/tea4j/v2/models/IdAssetsBody1.java @@ -0,0 +1,83 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: {{AppVer | JSEscape | Safe}} + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package org.gitnex.tea4j.v2.models; + +import com.google.gson.annotations.SerializedName; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.File; +import java.io.Serializable; +import java.util.Objects; + +/** IdAssetsBody1 */ +public class IdAssetsBody1 implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("attachment") + private File attachment = null; + + public IdAssetsBody1 attachment(File attachment) { + this.attachment = attachment; + return this; + } + + /** + * attachment to upload + * + * @return attachment + */ + @Schema(required = true, description = "attachment to upload") + public File getAttachment() { + return attachment; + } + + public void setAttachment(File attachment) { + this.attachment = attachment; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IdAssetsBody1 idAssetsBody1 = (IdAssetsBody1) o; + return Objects.equals(this.attachment, idAssetsBody1.attachment); + } + + @Override + public int hashCode() { + return Objects.hash(Objects.hashCode(attachment)); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IdAssetsBody1 {\n"); + + sb.append(" attachment: ").append(toIndentedString(attachment)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/org/gitnex/tea4j/v2/models/IndexAssetsBody.java b/src/main/java/org/gitnex/tea4j/v2/models/IndexAssetsBody.java new file mode 100644 index 0000000..4bd44b7 --- /dev/null +++ b/src/main/java/org/gitnex/tea4j/v2/models/IndexAssetsBody.java @@ -0,0 +1,83 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: {{AppVer | JSEscape | Safe}} + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package org.gitnex.tea4j.v2.models; + +import com.google.gson.annotations.SerializedName; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.File; +import java.io.Serializable; +import java.util.Objects; + +/** IndexAssetsBody */ +public class IndexAssetsBody implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("attachment") + private File attachment = null; + + public IndexAssetsBody attachment(File attachment) { + this.attachment = attachment; + return this; + } + + /** + * attachment to upload + * + * @return attachment + */ + @Schema(required = true, description = "attachment to upload") + public File getAttachment() { + return attachment; + } + + public void setAttachment(File attachment) { + this.attachment = attachment; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IndexAssetsBody indexAssetsBody = (IndexAssetsBody) o; + return Objects.equals(this.attachment, indexAssetsBody.attachment); + } + + @Override + public int hashCode() { + return Objects.hash(Objects.hashCode(attachment)); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IndexAssetsBody {\n"); + + sb.append(" attachment: ").append(toIndentedString(attachment)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/org/gitnex/tea4j/v2/models/Issue.java b/src/main/java/org/gitnex/tea4j/v2/models/Issue.java index 6208aea..7ecc398 100644 --- a/src/main/java/org/gitnex/tea4j/v2/models/Issue.java +++ b/src/main/java/org/gitnex/tea4j/v2/models/Issue.java @@ -25,6 +25,9 @@ import java.util.Objects; public class Issue implements Serializable { private static final long serialVersionUID = 1L; + @SerializedName("assets") + private List assets = null; + @SerializedName("assignee") private User assignee = null; @@ -94,6 +97,33 @@ public class Issue implements Serializable { @SerializedName("user") private User user = null; + public Issue assets(List assets) { + this.assets = assets; + return this; + } + + public Issue addAssetsItem(Attachment assetsItem) { + if (this.assets == null) { + this.assets = new ArrayList<>(); + } + this.assets.add(assetsItem); + return this; + } + + /** + * Get assets + * + * @return assets + */ + @Schema(description = "") + public List getAssets() { + return assets; + } + + public void setAssets(List assets) { + this.assets = assets; + } + public Issue assignee(User assignee) { this.assignee = assignee; return this; @@ -556,7 +586,8 @@ public class Issue implements Serializable { return false; } Issue issue = (Issue) o; - return Objects.equals(this.assignee, issue.assignee) + return Objects.equals(this.assets, issue.assets) + && Objects.equals(this.assignee, issue.assignee) && Objects.equals(this.assignees, issue.assignees) && Objects.equals(this.body, issue.body) && Objects.equals(this.closedAt, issue.closedAt) @@ -584,6 +615,7 @@ public class Issue implements Serializable { @Override public int hashCode() { return Objects.hash( + assets, assignee, assignees, body, @@ -614,6 +646,7 @@ public class Issue implements Serializable { StringBuilder sb = new StringBuilder(); sb.append("class Issue {\n"); + sb.append(" assets: ").append(toIndentedString(assets)).append("\n"); sb.append(" assignee: ").append(toIndentedString(assignee)).append("\n"); sb.append(" assignees: ").append(toIndentedString(assignees)).append("\n"); sb.append(" body: ").append(toIndentedString(body)).append("\n");