From d43cc799ed5a95f876e70493a7ca342c17001be1 Mon Sep 17 00:00:00 2001 From: gitnexbot Date: Sun, 1 May 2022 22:00:40 +0000 Subject: [PATCH] Synchronizing API and documentation updates --- docs/OrganizationApi.md | 92 +++++++++++++++++++ .../gitnex/tea4j/v2/apis/OrganizationApi.java | 14 +++ 2 files changed, 106 insertions(+) diff --git a/docs/OrganizationApi.md b/docs/OrganizationApi.md index 1e70321..74d2f86 100644 --- a/docs/OrganizationApi.md +++ b/docs/OrganizationApi.md @@ -38,6 +38,7 @@ Method | HTTP request | Description [**orgListRepos**](OrganizationApi.md#orgListRepos) | **GET** orgs/{org}/repos | List an organization's repos [**orgListTeamMember**](OrganizationApi.md#orgListTeamMember) | **GET** teams/{id}/members/{username} | List a particular member of team [**orgListTeamMembers**](OrganizationApi.md#orgListTeamMembers) | **GET** teams/{id}/members | List a team's members +[**orgListTeamRepo**](OrganizationApi.md#orgListTeamRepo) | **GET** teams/{id}/repos/{org}/{repo} | List a particular repo of team [**orgListTeamRepos**](OrganizationApi.md#orgListTeamRepos) | **GET** teams/{id}/repos | List a team's repos [**orgListTeams**](OrganizationApi.md#orgListTeams) | **GET** orgs/{org}/teams | List an organization's teams [**orgListUserOrgs**](OrganizationApi.md#orgListUserOrgs) | **GET** users/{username}/orgs | List a user's organizations @@ -3075,6 +3076,97 @@ 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 + + +# **orgListTeamRepo** +> Repository orgListTeamRepo(id, org, repo) + +List a particular repo of team + +### 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.OrganizationApi; + +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"); + +OrganizationApi apiInstance = new OrganizationApi(); +Long id = 789L; // Long | id of the team +String org = "org_example"; // String | organization that owns the repo to list +String repo = "repo_example"; // String | name of the repo to list +try { + Repository result = apiInstance.orgListTeamRepo(id, org, repo); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#orgListTeamRepo"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **Long**| id of the team | + **org** | **String**| organization that owns the repo to list | + **repo** | **String**| name of the repo to list | + +### Return type + +[**Repository**](Repository.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/OrganizationApi.java b/src/main/java/org/gitnex/tea4j/v2/apis/OrganizationApi.java index 6f10b0e..eb644ef 100644 --- a/src/main/java/org/gitnex/tea4j/v2/apis/OrganizationApi.java +++ b/src/main/java/org/gitnex/tea4j/v2/apis/OrganizationApi.java @@ -423,6 +423,20 @@ public interface OrganizationApi { @retrofit2.http.Query("page") Integer page, @retrofit2.http.Query("limit") Integer limit); + /** + * List a particular repo of team + * + * @param id id of the team (required) + * @param org organization that owns the repo to list (required) + * @param repo name of the repo to list (required) + * @return Call<Repository> + */ + @GET("teams/{id}/repos/{org}/{repo}") + Call orgListTeamRepo( + @retrofit2.http.Path("id") Long id, + @retrofit2.http.Path("org") String org, + @retrofit2.http.Path("repo") String repo); + /** * List a team's repos *