gitee.com/openeuler/go-gitee@v0.0.0-20220530104019-3af895bc380c/docs/WebhooksApi.md (about)

     1  # \WebhooksApi
     2  
     3  All URIs are relative to *https://gitee.com/api*
     4  
     5  Method | HTTP request | Description
     6  ------------- | ------------- | -------------
     7  [**DeleteV5ReposOwnerRepoHooksId**](WebhooksApi.md#DeleteV5ReposOwnerRepoHooksId) | **Delete** /v5/repos/{owner}/{repo}/hooks/{id} | 删除一个仓库WebHook
     8  [**GetV5ReposOwnerRepoHooks**](WebhooksApi.md#GetV5ReposOwnerRepoHooks) | **Get** /v5/repos/{owner}/{repo}/hooks | 列出仓库的WebHooks
     9  [**GetV5ReposOwnerRepoHooksId**](WebhooksApi.md#GetV5ReposOwnerRepoHooksId) | **Get** /v5/repos/{owner}/{repo}/hooks/{id} | 获取仓库单个WebHook
    10  [**PatchV5ReposOwnerRepoHooksId**](WebhooksApi.md#PatchV5ReposOwnerRepoHooksId) | **Patch** /v5/repos/{owner}/{repo}/hooks/{id} | 更新一个仓库WebHook
    11  [**PostV5ReposOwnerRepoHooks**](WebhooksApi.md#PostV5ReposOwnerRepoHooks) | **Post** /v5/repos/{owner}/{repo}/hooks | 创建一个仓库WebHook
    12  [**PostV5ReposOwnerRepoHooksIdTests**](WebhooksApi.md#PostV5ReposOwnerRepoHooksIdTests) | **Post** /v5/repos/{owner}/{repo}/hooks/{id}/tests | 测试WebHook是否发送成功
    13  
    14  
    15  # **DeleteV5ReposOwnerRepoHooksId**
    16  > DeleteV5ReposOwnerRepoHooksId(ctx, owner, repo, id, optional)
    17  删除一个仓库WebHook
    18  
    19  删除一个仓库WebHook
    20  
    21  ### Required Parameters
    22  
    23  Name | Type | Description  | Notes
    24  ------------- | ------------- | ------------- | -------------
    25   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    26    **owner** | **string**| 仓库所属空间地址(企业、组织或个人的地址path) | 
    27    **repo** | **string**| 仓库路径(path) | 
    28    **id** | **int32**| Webhook的ID | 
    29   **optional** | ***DeleteV5ReposOwnerRepoHooksIdOpts** | optional parameters | nil if no parameters
    30  
    31  ### Optional Parameters
    32  Optional parameters are passed through a pointer to a DeleteV5ReposOwnerRepoHooksIdOpts struct
    33  
    34  Name | Type | Description  | Notes
    35  ------------- | ------------- | ------------- | -------------
    36  
    37  
    38  
    39   **accessToken** | **optional.String**| 用户授权码 | 
    40  
    41  ### Return type
    42  
    43   (empty response body)
    44  
    45  ### Authorization
    46  
    47  No authorization required
    48  
    49  ### HTTP request headers
    50  
    51   - **Content-Type**: application/json, multipart/form-data
    52   - **Accept**: application/json
    53  
    54  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
    55  
    56  # **GetV5ReposOwnerRepoHooks**
    57  > []Hook GetV5ReposOwnerRepoHooks(ctx, owner, repo, optional)
    58  列出仓库的WebHooks
    59  
    60  列出仓库的WebHooks
    61  
    62  ### Required Parameters
    63  
    64  Name | Type | Description  | Notes
    65  ------------- | ------------- | ------------- | -------------
    66   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    67    **owner** | **string**| 仓库所属空间地址(企业、组织或个人的地址path) | 
    68    **repo** | **string**| 仓库路径(path) | 
    69   **optional** | ***GetV5ReposOwnerRepoHooksOpts** | optional parameters | nil if no parameters
    70  
    71  ### Optional Parameters
    72  Optional parameters are passed through a pointer to a GetV5ReposOwnerRepoHooksOpts struct
    73  
    74  Name | Type | Description  | Notes
    75  ------------- | ------------- | ------------- | -------------
    76  
    77  
    78   **accessToken** | **optional.String**| 用户授权码 | 
    79   **page** | **optional.Int32**| 当前的页码 | [default to 1]
    80   **perPage** | **optional.Int32**| 每页的数量,最大为 100 | [default to 20]
    81  
    82  ### Return type
    83  
    84  [**[]Hook**](Hook.md)
    85  
    86  ### Authorization
    87  
    88  No authorization required
    89  
    90  ### HTTP request headers
    91  
    92   - **Content-Type**: application/json, multipart/form-data
    93   - **Accept**: application/json
    94  
    95  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
    96  
    97  # **GetV5ReposOwnerRepoHooksId**
    98  > Hook GetV5ReposOwnerRepoHooksId(ctx, owner, repo, id, optional)
    99  获取仓库单个WebHook
   100  
   101  获取仓库单个WebHook
   102  
   103  ### Required Parameters
   104  
   105  Name | Type | Description  | Notes
   106  ------------- | ------------- | ------------- | -------------
   107   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   108    **owner** | **string**| 仓库所属空间地址(企业、组织或个人的地址path) | 
   109    **repo** | **string**| 仓库路径(path) | 
   110    **id** | **int32**| Webhook的ID | 
   111   **optional** | ***GetV5ReposOwnerRepoHooksIdOpts** | optional parameters | nil if no parameters
   112  
   113  ### Optional Parameters
   114  Optional parameters are passed through a pointer to a GetV5ReposOwnerRepoHooksIdOpts struct
   115  
   116  Name | Type | Description  | Notes
   117  ------------- | ------------- | ------------- | -------------
   118  
   119  
   120  
   121   **accessToken** | **optional.String**| 用户授权码 | 
   122  
   123  ### Return type
   124  
   125  [**Hook**](Hook.md)
   126  
   127  ### Authorization
   128  
   129  No authorization required
   130  
   131  ### HTTP request headers
   132  
   133   - **Content-Type**: application/json, multipart/form-data
   134   - **Accept**: application/json
   135  
   136  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
   137  
   138  # **PatchV5ReposOwnerRepoHooksId**
   139  > Hook PatchV5ReposOwnerRepoHooksId(ctx, owner, repo, id, url, optional)
   140  更新一个仓库WebHook
   141  
   142  更新一个仓库WebHook
   143  
   144  ### Required Parameters
   145  
   146  Name | Type | Description  | Notes
   147  ------------- | ------------- | ------------- | -------------
   148   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   149    **owner** | **string**| 仓库所属空间地址(企业、组织或个人的地址path) | 
   150    **repo** | **string**| 仓库路径(path) | 
   151    **id** | **int32**| Webhook的ID | 
   152    **url** | **string**| 远程HTTP URL | 
   153   **optional** | ***PatchV5ReposOwnerRepoHooksIdOpts** | optional parameters | nil if no parameters
   154  
   155  ### Optional Parameters
   156  Optional parameters are passed through a pointer to a PatchV5ReposOwnerRepoHooksIdOpts struct
   157  
   158  Name | Type | Description  | Notes
   159  ------------- | ------------- | ------------- | -------------
   160  
   161  
   162  
   163  
   164   **accessToken** | **optional.String**| 用户授权码 | 
   165   **password** | **optional.String**| 请求URL时会带上该密码,防止URL被恶意请求 | 
   166   **pushEvents** | **optional.Bool**| Push代码到仓库 | [default to true]
   167   **tagPushEvents** | **optional.Bool**| 提交Tag到仓库 | 
   168   **issuesEvents** | **optional.Bool**| 创建/关闭Issue | 
   169   **noteEvents** | **optional.Bool**| 评论了Issue/代码等等 | 
   170   **mergeRequestsEvents** | **optional.Bool**| 合并请求和合并后 | 
   171  
   172  ### Return type
   173  
   174  [**Hook**](Hook.md)
   175  
   176  ### Authorization
   177  
   178  No authorization required
   179  
   180  ### HTTP request headers
   181  
   182   - **Content-Type**: application/json, multipart/form-data
   183   - **Accept**: application/json
   184  
   185  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
   186  
   187  # **PostV5ReposOwnerRepoHooks**
   188  > Hook PostV5ReposOwnerRepoHooks(ctx, owner, repo, url, optional)
   189  创建一个仓库WebHook
   190  
   191  创建一个仓库WebHook
   192  
   193  ### Required Parameters
   194  
   195  Name | Type | Description  | Notes
   196  ------------- | ------------- | ------------- | -------------
   197   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   198    **owner** | **string**| 仓库所属空间地址(企业、组织或个人的地址path) | 
   199    **repo** | **string**| 仓库路径(path) | 
   200    **url** | **string**| 远程HTTP URL | 
   201   **optional** | ***PostV5ReposOwnerRepoHooksOpts** | optional parameters | nil if no parameters
   202  
   203  ### Optional Parameters
   204  Optional parameters are passed through a pointer to a PostV5ReposOwnerRepoHooksOpts struct
   205  
   206  Name | Type | Description  | Notes
   207  ------------- | ------------- | ------------- | -------------
   208  
   209  
   210  
   211   **accessToken** | **optional.String**| 用户授权码 | 
   212   **password** | **optional.String**| 请求URL时会带上该密码,防止URL被恶意请求 | 
   213   **pushEvents** | **optional.Bool**| Push代码到仓库 | [default to true]
   214   **tagPushEvents** | **optional.Bool**| 提交Tag到仓库 | 
   215   **issuesEvents** | **optional.Bool**| 创建/关闭Issue | 
   216   **noteEvents** | **optional.Bool**| 评论了Issue/代码等等 | 
   217   **mergeRequestsEvents** | **optional.Bool**| 合并请求和合并后 | 
   218  
   219  ### Return type
   220  
   221  [**Hook**](Hook.md)
   222  
   223  ### Authorization
   224  
   225  No authorization required
   226  
   227  ### HTTP request headers
   228  
   229   - **Content-Type**: application/json, multipart/form-data
   230   - **Accept**: application/json
   231  
   232  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
   233  
   234  # **PostV5ReposOwnerRepoHooksIdTests**
   235  > PostV5ReposOwnerRepoHooksIdTests(ctx, owner, repo, id, optional)
   236  测试WebHook是否发送成功
   237  
   238  测试WebHook是否发送成功
   239  
   240  ### Required Parameters
   241  
   242  Name | Type | Description  | Notes
   243  ------------- | ------------- | ------------- | -------------
   244   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   245    **owner** | **string**| 仓库所属空间地址(企业、组织或个人的地址path) | 
   246    **repo** | **string**| 仓库路径(path) | 
   247    **id** | **int32**| Webhook的ID | 
   248   **optional** | ***PostV5ReposOwnerRepoHooksIdTestsOpts** | optional parameters | nil if no parameters
   249  
   250  ### Optional Parameters
   251  Optional parameters are passed through a pointer to a PostV5ReposOwnerRepoHooksIdTestsOpts struct
   252  
   253  Name | Type | Description  | Notes
   254  ------------- | ------------- | ------------- | -------------
   255  
   256  
   257  
   258   **accessToken** | **optional.String**| 用户授权码 | 
   259  
   260  ### Return type
   261  
   262   (empty response body)
   263  
   264  ### Authorization
   265  
   266  No authorization required
   267  
   268  ### HTTP request headers
   269  
   270   - **Content-Type**: application/json, multipart/form-data
   271   - **Accept**: application/json
   272  
   273  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
   274