Synchronizing API and documentation updates

This commit is contained in:
gitnexbot
2023-03-11 00:03:35 +00:00
parent bec7a28b2f
commit d0526fe0bd
2 changed files with 498 additions and 0 deletions
+444
View File
@@ -10,6 +10,7 @@ Method | HTTP request | Description
[**updateUserSettings**](UserApi.md#updateUserSettings) | **PATCH** user/settings | Update user settings
[**userAddEmail**](UserApi.md#userAddEmail) | **POST** user/emails | Add email addresses
[**userCheckFollowing**](UserApi.md#userCheckFollowing) | **GET** users/{username}/following/{target} | Check if one user is following another user
[**userCreateHook**](UserApi.md#userCreateHook) | **POST** user/hooks | Create a hook
[**userCreateOAuth2Application**](UserApi.md#userCreateOAuth2Application) | **POST** user/applications/oauth2 | creates a new OAuth2 application
[**userCreateToken**](UserApi.md#userCreateToken) | **POST** users/{username}/tokens | Create an access token
[**userCurrentCheckFollowing**](UserApi.md#userCurrentCheckFollowing) | **GET** user/following/{username} | Check whether a user is followed by the authenticated user
@@ -34,10 +35,13 @@ Method | HTTP request | Description
[**userCurrentTrackedTimes**](UserApi.md#userCurrentTrackedTimes) | **GET** user/times | List the current user's tracked times
[**userDeleteAccessToken**](UserApi.md#userDeleteAccessToken) | **DELETE** users/{username}/tokens/{token} | delete an access token
[**userDeleteEmail**](UserApi.md#userDeleteEmail) | **DELETE** user/emails | Delete email addresses
[**userDeleteHook**](UserApi.md#userDeleteHook) | **DELETE** user/hooks/{id} | Delete a hook
[**userDeleteOAuth2Application**](UserApi.md#userDeleteOAuth2Application) | **DELETE** user/applications/oauth2/{id} | delete an OAuth2 Application
[**userEditHook**](UserApi.md#userEditHook) | **PATCH** user/hooks/{id} | Update a hook
[**userGet**](UserApi.md#userGet) | **GET** users/{username} | Get a user
[**userGetCurrent**](UserApi.md#userGetCurrent) | **GET** user | Get the authenticated user
[**userGetHeatmapData**](UserApi.md#userGetHeatmapData) | **GET** users/{username}/heatmap | Get a user's heatmap
[**userGetHook**](UserApi.md#userGetHook) | **GET** user/hooks/{id} | Get a hook
[**userGetOAuth2Application**](UserApi.md#userGetOAuth2Application) | **GET** user/applications/oauth2/{id} | get an OAuth2 Application
[**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
@@ -46,6 +50,7 @@ Method | HTTP request | Description
[**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
[**userListGPGKeys**](UserApi.md#userListGPGKeys) | **GET** users/{username}/gpg_keys | List the given user's GPG keys
[**userListHooks**](UserApi.md#userListHooks) | **GET** user/hooks | List the authenticated user's webhooks
[**userListKeys**](UserApi.md#userListKeys) | **GET** users/{username}/keys | List the given user's public keys
[**userListRepos**](UserApi.md#userListRepos) | **GET** users/{username}/repos | List the repos owned by the given user
[**userListStarred**](UserApi.md#userListStarred) | **GET** users/{username}/starred | The repos that the given user has starred
@@ -571,6 +576,93 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: Not defined
<a name="userCreateHook"></a>
# **userCreateHook**
> Hook userCreateHook(body)
Create a hook
### 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();
CreateHookOption body = new CreateHookOption(); // CreateHookOption |
try {
Hook result = apiInstance.userCreateHook(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userCreateHook");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**CreateHookOption**](CreateHookOption.md)| |
### Return type
[**Hook**](Hook.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
<a name="userCreateOAuth2Application"></a>
# **userCreateOAuth2Application**
> OAuth2Application userCreateOAuth2Application(body)
@@ -2691,6 +2783,93 @@ Name | Type | Description | Notes
- **Content-Type**: application/json, text/plain
- **Accept**: Not defined
<a name="userDeleteHook"></a>
# **userDeleteHook**
> Void userDeleteHook(id)
Delete a hook
### 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();
Long id = 789L; // Long | id of the hook to delete
try {
Void result = apiInstance.userDeleteHook(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userDeleteHook");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **Long**| id of the hook 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
<a name="userDeleteOAuth2Application"></a>
# **userDeleteOAuth2Application**
> Void userDeleteOAuth2Application(id)
@@ -2778,6 +2957,95 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: Not defined
<a name="userEditHook"></a>
# **userEditHook**
> Hook userEditHook(id, body)
Update a hook
### 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();
Long id = 789L; // Long | id of the hook to update
EditHookOption body = new EditHookOption(); // EditHookOption |
try {
Hook result = apiInstance.userEditHook(id, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userEditHook");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **Long**| id of the hook to update |
**body** | [**EditHookOption**](EditHookOption.md)| | [optional]
### Return type
[**Hook**](Hook.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
<a name="userGet"></a>
# **userGet**
> User userGet(username)
@@ -3030,6 +3298,93 @@ Name | Type | Description | Notes
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
<a name="userGetHook"></a>
# **userGetHook**
> Hook userGetHook(id)
Get a hook
### 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();
Long id = 789L; // Long | id of the hook to get
try {
Hook result = apiInstance.userGetHook(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetHook");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **Long**| id of the hook to get |
### Return type
[**Hook**](Hook.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
@@ -3742,6 +4097,95 @@ Name | Type | Description | Notes
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
<a name="userListHooks"></a>
# **userListHooks**
> List&lt;Hook&gt; userListHooks(page, limit)
List the authenticated user&#x27;s webhooks
### 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();
Integer page = 56; // Integer | page number of results to return (1-based)
Integer limit = 56; // Integer | page size of results
try {
List<Hook> result = apiInstance.userListHooks(page, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userListHooks");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**page** | **Integer**| page number of results to return (1-based) | [optional]
**limit** | **Integer**| page size of results | [optional]
### Return type
[**List&lt;Hook&gt;**](Hook.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
@@ -7,12 +7,15 @@ import org.gitnex.tea4j.v2.models.AccessToken;
import org.gitnex.tea4j.v2.models.CreateAccessTokenOption;
import org.gitnex.tea4j.v2.models.CreateEmailOption;
import org.gitnex.tea4j.v2.models.CreateGPGKeyOption;
import org.gitnex.tea4j.v2.models.CreateHookOption;
import org.gitnex.tea4j.v2.models.CreateKeyOption;
import org.gitnex.tea4j.v2.models.CreateOAuth2ApplicationOptions;
import org.gitnex.tea4j.v2.models.CreateRepoOption;
import org.gitnex.tea4j.v2.models.DeleteEmailOption;
import org.gitnex.tea4j.v2.models.EditHookOption;
import org.gitnex.tea4j.v2.models.Email;
import org.gitnex.tea4j.v2.models.GPGKey;
import org.gitnex.tea4j.v2.models.Hook;
import org.gitnex.tea4j.v2.models.InlineResponse2001;
import org.gitnex.tea4j.v2.models.OAuth2Application;
import org.gitnex.tea4j.v2.models.PublicKey;
@@ -86,6 +89,16 @@ public interface UserApi {
@retrofit2.http.Path("username") String username,
@retrofit2.http.Path("target") String target);
/**
* Create a hook
*
* @param body (required)
* @return Call&lt;Hook&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("user/hooks")
Call<Hook> userCreateHook(@retrofit2.http.Body CreateHookOption body);
/**
* creates a new OAuth2 application
*
@@ -345,6 +358,15 @@ public interface UserApi {
@DELETE("user/emails")
Call<Void> userDeleteEmail(@retrofit2.http.Body DeleteEmailOption body);
/**
* Delete a hook
*
* @param id id of the hook to delete (required)
* @return Call&lt;Void&gt;
*/
@DELETE("user/hooks/{id}")
Call<Void> userDeleteHook(@retrofit2.http.Path("id") Long id);
/**
* delete an OAuth2 Application
*
@@ -354,6 +376,18 @@ public interface UserApi {
@DELETE("user/applications/oauth2/{id}")
Call<Void> userDeleteOAuth2Application(@retrofit2.http.Path("id") Long id);
/**
* Update a hook
*
* @param id id of the hook to update (required)
* @param body (optional)
* @return Call&lt;Hook&gt;
*/
@Headers({"Content-Type:application/json"})
@PATCH("user/hooks/{id}")
Call<Hook> userEditHook(
@retrofit2.http.Path("id") Long id, @retrofit2.http.Body EditHookOption body);
/**
* Get a user
*
@@ -380,6 +414,15 @@ public interface UserApi {
@GET("users/{username}/heatmap")
Call<List<UserHeatmapData>> userGetHeatmapData(@retrofit2.http.Path("username") String username);
/**
* Get a hook
*
* @param id id of the hook to get (required)
* @return Call&lt;Hook&gt;
*/
@GET("user/hooks/{id}")
Call<Hook> userGetHook(@retrofit2.http.Path("id") Long id);
/**
* get an OAuth2 Application
*
@@ -475,6 +518,17 @@ public interface UserApi {
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List the authenticated user&#x27;s webhooks
*
* @param page page number of results to return (1-based) (optional)
* @param limit page size of results (optional)
* @return Call&lt;List&lt;Hook&gt;&gt;
*/
@GET("user/hooks")
Call<List<Hook>> userListHooks(
@retrofit2.http.Query("page") Integer page, @retrofit2.http.Query("limit") Integer limit);
/**
* List the given user&#x27;s public keys
*