diff --git a/docs/Activity.md b/docs/Activity.md new file mode 100644 index 0000000..87e055a --- /dev/null +++ b/docs/Activity.md @@ -0,0 +1,18 @@ +# Activity + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**actUser** | [**User**](User.md) | | [optional] +**actUserId** | **Long** | | [optional] +**comment** | [**Comment**](Comment.md) | | [optional] +**commentId** | **Long** | | [optional] +**content** | **String** | | [optional] +**created** | [**Date**](Date.md) | | [optional] +**id** | **Long** | | [optional] +**isPrivate** | **Boolean** | | [optional] +**opType** | **String** | | [optional] +**refName** | **String** | | [optional] +**repo** | [**Repository**](Repository.md) | | [optional] +**repoId** | **Long** | | [optional] +**userId** | **Long** | | [optional] diff --git a/docs/ActivitypubApi.md b/docs/ActivitypubApi.md index 4e6cbfc..b7e3eae 100644 --- a/docs/ActivitypubApi.md +++ b/docs/ActivitypubApi.md @@ -4,12 +4,12 @@ All URIs are relative to *http://{{AppSubUrl | JSEscape | Safe}}/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**activitypubPerson**](ActivitypubApi.md#activitypubPerson) | **GET** activitypub/user/{username} | Returns the Person actor for a user -[**activitypubPersonInbox**](ActivitypubApi.md#activitypubPersonInbox) | **POST** activitypub/user/{username}/inbox | Send to the inbox +[**activitypubPerson**](ActivitypubApi.md#activitypubPerson) | **GET** activitypub/user-id/{user-id} | Returns the Person actor for a user +[**activitypubPersonInbox**](ActivitypubApi.md#activitypubPersonInbox) | **POST** activitypub/user-id/{user-id}/inbox | Send to the inbox # **activitypubPerson** -> ActivityPub activitypubPerson(username) +> ActivityPub activitypubPerson(userId) Returns the Person actor for a user @@ -65,9 +65,9 @@ Token.setApiKey("YOUR API KEY"); //Token.setApiKeyPrefix("Token"); ActivitypubApi apiInstance = new ActivitypubApi(); -String username = "username_example"; // String | username of the user +Integer userId = 56; // Integer | user ID of the user try { - ActivityPub result = apiInstance.activitypubPerson(username); + ActivityPub result = apiInstance.activitypubPerson(userId); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ActivitypubApi#activitypubPerson"); @@ -79,7 +79,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **username** | **String**| username of the user | + **userId** | **Integer**| user ID of the user | ### Return type @@ -96,7 +96,7 @@ Name | Type | Description | Notes # **activitypubPersonInbox** -> Void activitypubPersonInbox(username) +> Void activitypubPersonInbox(userId) Send to the inbox @@ -152,9 +152,9 @@ Token.setApiKey("YOUR API KEY"); //Token.setApiKeyPrefix("Token"); ActivitypubApi apiInstance = new ActivitypubApi(); -String username = "username_example"; // String | username of the user +Integer userId = 56; // Integer | user ID of the user try { - Void result = apiInstance.activitypubPersonInbox(username); + Void result = apiInstance.activitypubPersonInbox(userId); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ActivitypubApi#activitypubPersonInbox"); @@ -166,7 +166,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **username** | **String**| username of the user | + **userId** | **Integer**| user ID of the user | ### Return type diff --git a/docs/OrganizationApi.md b/docs/OrganizationApi.md index ecad1f4..84e9b88 100644 --- a/docs/OrganizationApi.md +++ b/docs/OrganizationApi.md @@ -30,12 +30,14 @@ Method | HTTP request | Description [**orgGetUserPermissions**](OrganizationApi.md#orgGetUserPermissions) | **GET** users/{username}/orgs/{org}/permissions | Get user permissions in organization [**orgIsMember**](OrganizationApi.md#orgIsMember) | **GET** orgs/{org}/members/{username} | Check if a user is a member of an organization [**orgIsPublicMember**](OrganizationApi.md#orgIsPublicMember) | **GET** orgs/{org}/public_members/{username} | Check if a user is a public member of an organization +[**orgListActivityFeeds**](OrganizationApi.md#orgListActivityFeeds) | **GET** orgs/{org}/activities/feeds | List an organization's activity feeds [**orgListCurrentUserOrgs**](OrganizationApi.md#orgListCurrentUserOrgs) | **GET** user/orgs | List the current user's organizations [**orgListHooks**](OrganizationApi.md#orgListHooks) | **GET** orgs/{org}/hooks | List an organization's webhooks [**orgListLabels**](OrganizationApi.md#orgListLabels) | **GET** orgs/{org}/labels | List an organization's labels [**orgListMembers**](OrganizationApi.md#orgListMembers) | **GET** orgs/{org}/members | List an organization's members [**orgListPublicMembers**](OrganizationApi.md#orgListPublicMembers) | **GET** orgs/{org}/public_members | List an organization's public members [**orgListRepos**](OrganizationApi.md#orgListRepos) | **GET** orgs/{org}/repos | List an organization's repos +[**orgListTeamActivityFeeds**](OrganizationApi.md#orgListTeamActivityFeeds) | **GET** teams/{id}/activities/feeds | List a team's activity feeds [**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 @@ -2357,6 +2359,99 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: Not defined + +# **orgListActivityFeeds** +> List<Activity> orgListActivityFeeds(org, date, page, limit) + +List an organization's activity feeds + +### 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(); +String org = "org_example"; // String | name of the org +Date date = new Date(); // Date | the date of the activities to be found +Integer page = 56; // Integer | page number of results to return (1-based) +Integer limit = 56; // Integer | page size of results +try { + List result = apiInstance.orgListActivityFeeds(org, date, page, limit); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#orgListActivityFeeds"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| name of the org | + **date** | **Date**| the date of the activities to be found | [optional] + **page** | **Integer**| page number of results to return (1-based) | [optional] + **limit** | **Integer**| page size of results | [optional] + +### Return type + +[**List<Activity>**](Activity.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 + # **orgListCurrentUserOrgs** > List<Organization> orgListCurrentUserOrgs(page, limit) @@ -2896,6 +2991,99 @@ 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 + + +# **orgListTeamActivityFeeds** +> List<Activity> orgListTeamActivityFeeds(id, date, page, limit) + +List a team's activity feeds + +### 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 +Date date = new Date(); // Date | the date of the activities to be found +Integer page = 56; // Integer | page number of results to return (1-based) +Integer limit = 56; // Integer | page size of results +try { + List result = apiInstance.orgListTeamActivityFeeds(id, date, page, limit); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#orgListTeamActivityFeeds"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **Long**| id of the team | + **date** | **Date**| the date of the activities to be found | [optional] + **page** | **Integer**| page number of results to return (1-based) | [optional] + **limit** | **Integer**| page size of results | [optional] + +### Return type + +[**List<Activity>**](Activity.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/docs/RepositoryApi.md b/docs/RepositoryApi.md index 02ab3d8..ca1b355 100644 --- a/docs/RepositoryApi.md +++ b/docs/RepositoryApi.md @@ -100,6 +100,7 @@ Method | HTTP request | Description [**repoGetWikiPage**](RepositoryApi.md#repoGetWikiPage) | **GET** repos/{owner}/{repo}/wiki/page/{pageName} | Get a wiki page [**repoGetWikiPageRevisions**](RepositoryApi.md#repoGetWikiPageRevisions) | **GET** repos/{owner}/{repo}/wiki/revisions/{pageName} | Get revisions of a wiki page [**repoGetWikiPages**](RepositoryApi.md#repoGetWikiPages) | **GET** repos/{owner}/{repo}/wiki/pages | Get all wiki pages +[**repoListActivityFeeds**](RepositoryApi.md#repoListActivityFeeds) | **GET** repos/{owner}/{repo}/activities/feeds | List a repository's activity feeds [**repoListAllGitRefs**](RepositoryApi.md#repoListAllGitRefs) | **GET** repos/{owner}/{repo}/git/refs | Get specified ref or filtered repository's refs [**repoListBranchProtection**](RepositoryApi.md#repoListBranchProtection) | **GET** repos/{owner}/{repo}/branch_protections | List branch protections for a repository [**repoListBranches**](RepositoryApi.md#repoListBranches) | **GET** repos/{owner}/{repo}/branches | List a repository's branches @@ -8943,6 +8944,101 @@ 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 + + +# **repoListActivityFeeds** +> List<Activity> repoListActivityFeeds(owner, repo, date, page, limit) + +List a repository's activity feeds + +### 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 +Date date = new Date(); // Date | the date of the activities to be found +Integer page = 56; // Integer | page number of results to return (1-based) +Integer limit = 56; // Integer | page size of results +try { + List result = apiInstance.repoListActivityFeeds(owner, repo, date, page, limit); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoListActivityFeeds"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **date** | **Date**| the date of the activities to be found | [optional] + **page** | **Integer**| page number of results to return (1-based) | [optional] + **limit** | **Integer**| page size of results | [optional] + +### Return type + +[**List<Activity>**](Activity.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/docs/UserApi.md b/docs/UserApi.md index 37855ee..a85e2c7 100644 --- a/docs/UserApi.md +++ b/docs/UserApi.md @@ -46,6 +46,7 @@ Method | HTTP request | Description [**userGetOauth2Application**](UserApi.md#userGetOauth2Application) | **GET** user/applications/oauth2 | List the authenticated user's oauth2 applications [**userGetStopWatches**](UserApi.md#userGetStopWatches) | **GET** user/stopwatches | Get list of all existing stopwatches [**userGetTokens**](UserApi.md#userGetTokens) | **GET** users/{username}/tokens | List the authenticated user's access tokens +[**userListActivityFeeds**](UserApi.md#userListActivityFeeds) | **GET** users/{username}/activities/feeds | List a user's activity feeds [**userListEmails**](UserApi.md#userListEmails) | **GET** user/emails | List the authenticated user's email addresses [**userListFollowers**](UserApi.md#userListFollowers) | **GET** users/{username}/followers | List the given user's followers [**userListFollowing**](UserApi.md#userListFollowing) | **GET** users/{username}/following | List the users that the given user is following @@ -3741,6 +3742,101 @@ 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 + + +# **userListActivityFeeds** +> List<Activity> userListActivityFeeds(username, onlyPerformedBy, date, page, limit) + +List a user's activity feeds + +### 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.UserApi; + +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"); + +UserApi apiInstance = new UserApi(); +String username = "username_example"; // String | username of user +Boolean onlyPerformedBy = true; // Boolean | if true, only show actions performed by the requested user +Date date = new Date(); // Date | the date of the activities to be found +Integer page = 56; // Integer | page number of results to return (1-based) +Integer limit = 56; // Integer | page size of results +try { + List result = apiInstance.userListActivityFeeds(username, onlyPerformedBy, date, page, limit); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#userListActivityFeeds"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| username of user | + **onlyPerformedBy** | **Boolean**| if true, only show actions performed by the requested user | [optional] + **date** | **Date**| the date of the activities to be found | [optional] + **page** | **Integer**| page number of results to return (1-based) | [optional] + **limit** | **Integer**| page size of results | [optional] + +### Return type + +[**List<Activity>**](Activity.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/ActivitypubApi.java b/src/main/java/org/gitnex/tea4j/v2/apis/ActivitypubApi.java index 220b3c5..586dbcf 100644 --- a/src/main/java/org/gitnex/tea4j/v2/apis/ActivitypubApi.java +++ b/src/main/java/org/gitnex/tea4j/v2/apis/ActivitypubApi.java @@ -9,18 +9,18 @@ public interface ActivitypubApi { /** * Returns the Person actor for a user * - * @param username username of the user (required) + * @param userId user ID of the user (required) * @return Call<ActivityPub> */ - @GET("activitypub/user/{username}") - Call activitypubPerson(@retrofit2.http.Path("username") String username); + @GET("activitypub/user-id/{user-id}") + Call activitypubPerson(@retrofit2.http.Path("user-id") Integer userId); /** * Send to the inbox * - * @param username username of the user (required) + * @param userId user ID of the user (required) * @return Call<Void> */ - @POST("activitypub/user/{username}/inbox") - Call activitypubPersonInbox(@retrofit2.http.Path("username") String username); + @POST("activitypub/user-id/{user-id}/inbox") + Call activitypubPersonInbox(@retrofit2.http.Path("user-id") Integer userId); } 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 ed33e7b..a742f92 100644 --- a/src/main/java/org/gitnex/tea4j/v2/apis/OrganizationApi.java +++ b/src/main/java/org/gitnex/tea4j/v2/apis/OrganizationApi.java @@ -1,7 +1,9 @@ package org.gitnex.tea4j.v2.apis; +import java.util.Date; import java.util.List; import org.gitnex.tea4j.v2.CollectionFormats.*; +import org.gitnex.tea4j.v2.models.Activity; import org.gitnex.tea4j.v2.models.CreateHookOption; import org.gitnex.tea4j.v2.models.CreateLabelOption; import org.gitnex.tea4j.v2.models.CreateOrgOption; @@ -317,6 +319,22 @@ public interface OrganizationApi { Call orgIsPublicMember( @retrofit2.http.Path("org") String org, @retrofit2.http.Path("username") String username); + /** + * List an organization's activity feeds + * + * @param org name of the org (required) + * @param date the date of the activities to be found (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return Call<List<Activity>> + */ + @GET("orgs/{org}/activities/feeds") + Call> orgListActivityFeeds( + @retrofit2.http.Path("org") String org, + @retrofit2.http.Query("date") Date date, + @retrofit2.http.Query("page") Integer page, + @retrofit2.http.Query("limit") Integer limit); + /** * List the current user's organizations * @@ -398,6 +416,22 @@ public interface OrganizationApi { @retrofit2.http.Query("page") Integer page, @retrofit2.http.Query("limit") Integer limit); + /** + * List a team's activity feeds + * + * @param id id of the team (required) + * @param date the date of the activities to be found (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return Call<List<Activity>> + */ + @GET("teams/{id}/activities/feeds") + Call> orgListTeamActivityFeeds( + @retrofit2.http.Path("id") Long id, + @retrofit2.http.Query("date") Date date, + @retrofit2.http.Query("page") Integer page, + @retrofit2.http.Query("limit") Integer limit); + /** * List a particular member of team * diff --git a/src/main/java/org/gitnex/tea4j/v2/apis/RepositoryApi.java b/src/main/java/org/gitnex/tea4j/v2/apis/RepositoryApi.java index f51295e..19af8c6 100644 --- a/src/main/java/org/gitnex/tea4j/v2/apis/RepositoryApi.java +++ b/src/main/java/org/gitnex/tea4j/v2/apis/RepositoryApi.java @@ -5,6 +5,7 @@ import java.util.List; import java.util.Map; import okhttp3.RequestBody; import org.gitnex.tea4j.v2.CollectionFormats.*; +import org.gitnex.tea4j.v2.models.Activity; import org.gitnex.tea4j.v2.models.AddCollaboratorOption; import org.gitnex.tea4j.v2.models.AnnotatedTag; import org.gitnex.tea4j.v2.models.Attachment; @@ -1524,6 +1525,24 @@ public interface RepositoryApi { @retrofit2.http.Query("page") Integer page, @retrofit2.http.Query("limit") Integer limit); + /** + * List a repository's activity feeds + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param date the date of the activities to be found (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return Call<List<Activity>> + */ + @GET("repos/{owner}/{repo}/activities/feeds") + Call> repoListActivityFeeds( + @retrofit2.http.Path("owner") String owner, + @retrofit2.http.Path("repo") String repo, + @retrofit2.http.Query("date") Date date, + @retrofit2.http.Query("page") Integer page, + @retrofit2.http.Query("limit") Integer limit); + /** * Get specified ref or filtered repository's refs * diff --git a/src/main/java/org/gitnex/tea4j/v2/apis/UserApi.java b/src/main/java/org/gitnex/tea4j/v2/apis/UserApi.java index 9ae321d..5d163ee 100644 --- a/src/main/java/org/gitnex/tea4j/v2/apis/UserApi.java +++ b/src/main/java/org/gitnex/tea4j/v2/apis/UserApi.java @@ -4,6 +4,7 @@ import java.util.Date; import java.util.List; import org.gitnex.tea4j.v2.CollectionFormats.*; import org.gitnex.tea4j.v2.models.AccessToken; +import org.gitnex.tea4j.v2.models.Activity; import org.gitnex.tea4j.v2.models.CreateAccessTokenOption; import org.gitnex.tea4j.v2.models.CreateEmailOption; import org.gitnex.tea4j.v2.models.CreateGPGKeyOption; @@ -468,6 +469,24 @@ public interface UserApi { @retrofit2.http.Query("page") Integer page, @retrofit2.http.Query("limit") Integer limit); + /** + * List a user's activity feeds + * + * @param username username of user (required) + * @param onlyPerformedBy if true, only show actions performed by the requested user (optional) + * @param date the date of the activities to be found (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return Call<List<Activity>> + */ + @GET("users/{username}/activities/feeds") + Call> userListActivityFeeds( + @retrofit2.http.Path("username") String username, + @retrofit2.http.Query("only-performed-by") Boolean onlyPerformedBy, + @retrofit2.http.Query("date") Date date, + @retrofit2.http.Query("page") Integer page, + @retrofit2.http.Query("limit") Integer limit); + /** * List the authenticated user's email addresses * diff --git a/src/main/java/org/gitnex/tea4j/v2/models/Activity.java b/src/main/java/org/gitnex/tea4j/v2/models/Activity.java new file mode 100644 index 0000000..7adf757 --- /dev/null +++ b/src/main/java/org/gitnex/tea4j/v2/models/Activity.java @@ -0,0 +1,373 @@ +/* + * 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.Serializable; +import java.util.Date; +import java.util.Objects; + +/** Activity */ +public class Activity implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("act_user") + private User actUser = null; + + @SerializedName("act_user_id") + private Long actUserId = null; + + @SerializedName("comment") + private Comment comment = null; + + @SerializedName("comment_id") + private Long commentId = null; + + @SerializedName("content") + private String content = null; + + @SerializedName("created") + private Date created = null; + + @SerializedName("id") + private Long id = null; + + @SerializedName("is_private") + private Boolean isPrivate = null; + + @SerializedName("op_type") + private String opType = null; + + @SerializedName("ref_name") + private String refName = null; + + @SerializedName("repo") + private Repository repo = null; + + @SerializedName("repo_id") + private Long repoId = null; + + @SerializedName("user_id") + private Long userId = null; + + public Activity actUser(User actUser) { + this.actUser = actUser; + return this; + } + + /** + * Get actUser + * + * @return actUser + */ + @Schema(description = "") + public User getActUser() { + return actUser; + } + + public void setActUser(User actUser) { + this.actUser = actUser; + } + + public Activity actUserId(Long actUserId) { + this.actUserId = actUserId; + return this; + } + + /** + * Get actUserId + * + * @return actUserId + */ + @Schema(description = "") + public Long getActUserId() { + return actUserId; + } + + public void setActUserId(Long actUserId) { + this.actUserId = actUserId; + } + + public Activity comment(Comment comment) { + this.comment = comment; + return this; + } + + /** + * Get comment + * + * @return comment + */ + @Schema(description = "") + public Comment getComment() { + return comment; + } + + public void setComment(Comment comment) { + this.comment = comment; + } + + public Activity commentId(Long commentId) { + this.commentId = commentId; + return this; + } + + /** + * Get commentId + * + * @return commentId + */ + @Schema(description = "") + public Long getCommentId() { + return commentId; + } + + public void setCommentId(Long commentId) { + this.commentId = commentId; + } + + public Activity content(String content) { + this.content = content; + return this; + } + + /** + * Get content + * + * @return content + */ + @Schema(description = "") + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public Activity created(Date created) { + this.created = created; + return this; + } + + /** + * Get created + * + * @return created + */ + @Schema(description = "") + public Date getCreated() { + return created; + } + + public void setCreated(Date created) { + this.created = created; + } + + public Activity id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @return id + */ + @Schema(description = "") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Activity isPrivate(Boolean isPrivate) { + this.isPrivate = isPrivate; + return this; + } + + /** + * Get isPrivate + * + * @return isPrivate + */ + @Schema(description = "") + public Boolean isIsPrivate() { + return isPrivate; + } + + public void setIsPrivate(Boolean isPrivate) { + this.isPrivate = isPrivate; + } + + public Activity opType(String opType) { + this.opType = opType; + return this; + } + + /** + * Get opType + * + * @return opType + */ + @Schema(description = "") + public String getOpType() { + return opType; + } + + public void setOpType(String opType) { + this.opType = opType; + } + + public Activity refName(String refName) { + this.refName = refName; + return this; + } + + /** + * Get refName + * + * @return refName + */ + @Schema(description = "") + public String getRefName() { + return refName; + } + + public void setRefName(String refName) { + this.refName = refName; + } + + public Activity repo(Repository repo) { + this.repo = repo; + return this; + } + + /** + * Get repo + * + * @return repo + */ + @Schema(description = "") + public Repository getRepo() { + return repo; + } + + public void setRepo(Repository repo) { + this.repo = repo; + } + + public Activity repoId(Long repoId) { + this.repoId = repoId; + return this; + } + + /** + * Get repoId + * + * @return repoId + */ + @Schema(description = "") + public Long getRepoId() { + return repoId; + } + + public void setRepoId(Long repoId) { + this.repoId = repoId; + } + + public Activity userId(Long userId) { + this.userId = userId; + return this; + } + + /** + * Get userId + * + * @return userId + */ + @Schema(description = "") + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Activity activity = (Activity) o; + return Objects.equals(this.actUser, activity.actUser) + && Objects.equals(this.actUserId, activity.actUserId) + && Objects.equals(this.comment, activity.comment) + && Objects.equals(this.commentId, activity.commentId) + && Objects.equals(this.content, activity.content) + && Objects.equals(this.created, activity.created) + && Objects.equals(this.id, activity.id) + && Objects.equals(this.isPrivate, activity.isPrivate) + && Objects.equals(this.opType, activity.opType) + && Objects.equals(this.refName, activity.refName) + && Objects.equals(this.repo, activity.repo) + && Objects.equals(this.repoId, activity.repoId) + && Objects.equals(this.userId, activity.userId); + } + + @Override + public int hashCode() { + return Objects.hash( + actUser, actUserId, comment, commentId, content, created, id, isPrivate, opType, refName, + repo, repoId, userId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Activity {\n"); + + sb.append(" actUser: ").append(toIndentedString(actUser)).append("\n"); + sb.append(" actUserId: ").append(toIndentedString(actUserId)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" commentId: ").append(toIndentedString(commentId)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isPrivate: ").append(toIndentedString(isPrivate)).append("\n"); + sb.append(" opType: ").append(toIndentedString(opType)).append("\n"); + sb.append(" refName: ").append(toIndentedString(refName)).append("\n"); + sb.append(" repo: ").append(toIndentedString(repo)).append("\n"); + sb.append(" repoId: ").append(toIndentedString(repoId)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).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 "); + } +}