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

     1  # \GistsApi
     2  
     3  All URIs are relative to *https://gitee.com/api*
     4  
     5  Method | HTTP request | Description
     6  ------------- | ------------- | -------------
     7  [**DeleteV5GistsGistIdCommentsId**](GistsApi.md#DeleteV5GistsGistIdCommentsId) | **Delete** /v5/gists/{gist_id}/comments/{id} | 删除代码片段的评论
     8  [**DeleteV5GistsId**](GistsApi.md#DeleteV5GistsId) | **Delete** /v5/gists/{id} | 删除指定代码片段
     9  [**DeleteV5GistsIdStar**](GistsApi.md#DeleteV5GistsIdStar) | **Delete** /v5/gists/{id}/star | 取消Star代码片段
    10  [**GetV5Gists**](GistsApi.md#GetV5Gists) | **Get** /v5/gists | 获取代码片段
    11  [**GetV5GistsGistIdComments**](GistsApi.md#GetV5GistsGistIdComments) | **Get** /v5/gists/{gist_id}/comments | 获取代码片段的评论
    12  [**GetV5GistsGistIdCommentsId**](GistsApi.md#GetV5GistsGistIdCommentsId) | **Get** /v5/gists/{gist_id}/comments/{id} | 获取单条代码片段的评论
    13  [**GetV5GistsId**](GistsApi.md#GetV5GistsId) | **Get** /v5/gists/{id} | 获取单条代码片段
    14  [**GetV5GistsIdCommits**](GistsApi.md#GetV5GistsIdCommits) | **Get** /v5/gists/{id}/commits | 获取代码片段的commit
    15  [**GetV5GistsIdForks**](GistsApi.md#GetV5GistsIdForks) | **Get** /v5/gists/{id}/forks | 获取 Fork 了指定代码片段的列表
    16  [**GetV5GistsIdStar**](GistsApi.md#GetV5GistsIdStar) | **Get** /v5/gists/{id}/star | 判断代码片段是否已Star
    17  [**GetV5GistsPublic**](GistsApi.md#GetV5GistsPublic) | **Get** /v5/gists/public | 获取公开的代码片段
    18  [**GetV5GistsStarred**](GistsApi.md#GetV5GistsStarred) | **Get** /v5/gists/starred | 获取用户Star的代码片段
    19  [**GetV5UsersUsernameGists**](GistsApi.md#GetV5UsersUsernameGists) | **Get** /v5/users/{username}/gists | 获取指定用户的公开代码片段
    20  [**PatchV5GistsGistIdCommentsId**](GistsApi.md#PatchV5GistsGistIdCommentsId) | **Patch** /v5/gists/{gist_id}/comments/{id} | 修改代码片段的评论
    21  [**PatchV5GistsId**](GistsApi.md#PatchV5GistsId) | **Patch** /v5/gists/{id} | 修改代码片段
    22  [**PostV5Gists**](GistsApi.md#PostV5Gists) | **Post** /v5/gists | 创建代码片段
    23  [**PostV5GistsGistIdComments**](GistsApi.md#PostV5GistsGistIdComments) | **Post** /v5/gists/{gist_id}/comments | 增加代码片段的评论
    24  [**PostV5GistsIdForks**](GistsApi.md#PostV5GistsIdForks) | **Post** /v5/gists/{id}/forks | Fork代码片段
    25  [**PutV5GistsIdStar**](GistsApi.md#PutV5GistsIdStar) | **Put** /v5/gists/{id}/star | Star代码片段
    26  
    27  
    28  # **DeleteV5GistsGistIdCommentsId**
    29  > DeleteV5GistsGistIdCommentsId(ctx, gistId, id, optional)
    30  删除代码片段的评论
    31  
    32  删除代码片段的评论
    33  
    34  ### Required Parameters
    35  
    36  Name | Type | Description  | Notes
    37  ------------- | ------------- | ------------- | -------------
    38   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    39    **gistId** | **string**| 代码片段的ID | 
    40    **id** | **int32**| 评论的ID | 
    41   **optional** | ***DeleteV5GistsGistIdCommentsIdOpts** | optional parameters | nil if no parameters
    42  
    43  ### Optional Parameters
    44  Optional parameters are passed through a pointer to a DeleteV5GistsGistIdCommentsIdOpts struct
    45  
    46  Name | Type | Description  | Notes
    47  ------------- | ------------- | ------------- | -------------
    48  
    49  
    50   **accessToken** | **optional.String**| 用户授权码 | 
    51  
    52  ### Return type
    53  
    54   (empty response body)
    55  
    56  ### Authorization
    57  
    58  No authorization required
    59  
    60  ### HTTP request headers
    61  
    62   - **Content-Type**: application/json, multipart/form-data
    63   - **Accept**: application/json
    64  
    65  [[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)
    66  
    67  # **DeleteV5GistsId**
    68  > DeleteV5GistsId(ctx, id, optional)
    69  删除指定代码片段
    70  
    71  删除指定代码片段
    72  
    73  ### Required Parameters
    74  
    75  Name | Type | Description  | Notes
    76  ------------- | ------------- | ------------- | -------------
    77   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    78    **id** | **string**| 代码片段的ID | 
    79   **optional** | ***DeleteV5GistsIdOpts** | optional parameters | nil if no parameters
    80  
    81  ### Optional Parameters
    82  Optional parameters are passed through a pointer to a DeleteV5GistsIdOpts struct
    83  
    84  Name | Type | Description  | Notes
    85  ------------- | ------------- | ------------- | -------------
    86  
    87   **accessToken** | **optional.String**| 用户授权码 | 
    88  
    89  ### Return type
    90  
    91   (empty response body)
    92  
    93  ### Authorization
    94  
    95  No authorization required
    96  
    97  ### HTTP request headers
    98  
    99   - **Content-Type**: application/json, multipart/form-data
   100   - **Accept**: application/json
   101  
   102  [[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)
   103  
   104  # **DeleteV5GistsIdStar**
   105  > DeleteV5GistsIdStar(ctx, id, optional)
   106  取消Star代码片段
   107  
   108  取消Star代码片段
   109  
   110  ### Required Parameters
   111  
   112  Name | Type | Description  | Notes
   113  ------------- | ------------- | ------------- | -------------
   114   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   115    **id** | **string**| 代码片段的ID | 
   116   **optional** | ***DeleteV5GistsIdStarOpts** | optional parameters | nil if no parameters
   117  
   118  ### Optional Parameters
   119  Optional parameters are passed through a pointer to a DeleteV5GistsIdStarOpts struct
   120  
   121  Name | Type | Description  | Notes
   122  ------------- | ------------- | ------------- | -------------
   123  
   124   **accessToken** | **optional.String**| 用户授权码 | 
   125  
   126  ### Return type
   127  
   128   (empty response body)
   129  
   130  ### Authorization
   131  
   132  No authorization required
   133  
   134  ### HTTP request headers
   135  
   136   - **Content-Type**: application/json, multipart/form-data
   137   - **Accept**: application/json
   138  
   139  [[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)
   140  
   141  # **GetV5Gists**
   142  > []Code GetV5Gists(ctx, optional)
   143  获取代码片段
   144  
   145  获取代码片段
   146  
   147  ### Required Parameters
   148  
   149  Name | Type | Description  | Notes
   150  ------------- | ------------- | ------------- | -------------
   151   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   152   **optional** | ***GetV5GistsOpts** | optional parameters | nil if no parameters
   153  
   154  ### Optional Parameters
   155  Optional parameters are passed through a pointer to a GetV5GistsOpts struct
   156  
   157  Name | Type | Description  | Notes
   158  ------------- | ------------- | ------------- | -------------
   159   **accessToken** | **optional.String**| 用户授权码 | 
   160   **since** | **optional.String**| 起始的更新时间,要求时间格式为 ISO 8601 | 
   161   **page** | **optional.Int32**| 当前的页码 | [default to 1]
   162   **perPage** | **optional.Int32**| 每页的数量,最大为 100 | [default to 20]
   163  
   164  ### Return type
   165  
   166  [**[]Code**](Code.md)
   167  
   168  ### Authorization
   169  
   170  No authorization required
   171  
   172  ### HTTP request headers
   173  
   174   - **Content-Type**: application/json, multipart/form-data
   175   - **Accept**: application/json
   176  
   177  [[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)
   178  
   179  # **GetV5GistsGistIdComments**
   180  > []CodeComment GetV5GistsGistIdComments(ctx, gistId, optional)
   181  获取代码片段的评论
   182  
   183  获取代码片段的评论
   184  
   185  ### Required Parameters
   186  
   187  Name | Type | Description  | Notes
   188  ------------- | ------------- | ------------- | -------------
   189   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   190    **gistId** | **string**| 代码片段的ID | 
   191   **optional** | ***GetV5GistsGistIdCommentsOpts** | optional parameters | nil if no parameters
   192  
   193  ### Optional Parameters
   194  Optional parameters are passed through a pointer to a GetV5GistsGistIdCommentsOpts struct
   195  
   196  Name | Type | Description  | Notes
   197  ------------- | ------------- | ------------- | -------------
   198  
   199   **accessToken** | **optional.String**| 用户授权码 | 
   200   **page** | **optional.Int32**| 当前的页码 | [default to 1]
   201   **perPage** | **optional.Int32**| 每页的数量,最大为 100 | [default to 20]
   202  
   203  ### Return type
   204  
   205  [**[]CodeComment**](CodeComment.md)
   206  
   207  ### Authorization
   208  
   209  No authorization required
   210  
   211  ### HTTP request headers
   212  
   213   - **Content-Type**: application/json, multipart/form-data
   214   - **Accept**: application/json
   215  
   216  [[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)
   217  
   218  # **GetV5GistsGistIdCommentsId**
   219  > CodeComment GetV5GistsGistIdCommentsId(ctx, gistId, id, optional)
   220  获取单条代码片段的评论
   221  
   222  获取单条代码片段的评论
   223  
   224  ### Required Parameters
   225  
   226  Name | Type | Description  | Notes
   227  ------------- | ------------- | ------------- | -------------
   228   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   229    **gistId** | **string**| 代码片段的ID | 
   230    **id** | **int32**| 评论的ID | 
   231   **optional** | ***GetV5GistsGistIdCommentsIdOpts** | optional parameters | nil if no parameters
   232  
   233  ### Optional Parameters
   234  Optional parameters are passed through a pointer to a GetV5GistsGistIdCommentsIdOpts struct
   235  
   236  Name | Type | Description  | Notes
   237  ------------- | ------------- | ------------- | -------------
   238  
   239  
   240   **accessToken** | **optional.String**| 用户授权码 | 
   241  
   242  ### Return type
   243  
   244  [**CodeComment**](CodeComment.md)
   245  
   246  ### Authorization
   247  
   248  No authorization required
   249  
   250  ### HTTP request headers
   251  
   252   - **Content-Type**: application/json, multipart/form-data
   253   - **Accept**: application/json
   254  
   255  [[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)
   256  
   257  # **GetV5GistsId**
   258  > CodeForksHistory GetV5GistsId(ctx, id, optional)
   259  获取单条代码片段
   260  
   261  获取单条代码片段
   262  
   263  ### Required Parameters
   264  
   265  Name | Type | Description  | Notes
   266  ------------- | ------------- | ------------- | -------------
   267   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   268    **id** | **string**| 代码片段的ID | 
   269   **optional** | ***GetV5GistsIdOpts** | optional parameters | nil if no parameters
   270  
   271  ### Optional Parameters
   272  Optional parameters are passed through a pointer to a GetV5GistsIdOpts struct
   273  
   274  Name | Type | Description  | Notes
   275  ------------- | ------------- | ------------- | -------------
   276  
   277   **accessToken** | **optional.String**| 用户授权码 | 
   278  
   279  ### Return type
   280  
   281  [**CodeForksHistory**](CodeForksHistory.md)
   282  
   283  ### Authorization
   284  
   285  No authorization required
   286  
   287  ### HTTP request headers
   288  
   289   - **Content-Type**: application/json, multipart/form-data
   290   - **Accept**: application/json
   291  
   292  [[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)
   293  
   294  # **GetV5GistsIdCommits**
   295  > CodeForksHistory GetV5GistsIdCommits(ctx, id, optional)
   296  获取代码片段的commit
   297  
   298  获取代码片段的commit
   299  
   300  ### Required Parameters
   301  
   302  Name | Type | Description  | Notes
   303  ------------- | ------------- | ------------- | -------------
   304   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   305    **id** | **string**| 代码片段的ID | 
   306   **optional** | ***GetV5GistsIdCommitsOpts** | optional parameters | nil if no parameters
   307  
   308  ### Optional Parameters
   309  Optional parameters are passed through a pointer to a GetV5GistsIdCommitsOpts struct
   310  
   311  Name | Type | Description  | Notes
   312  ------------- | ------------- | ------------- | -------------
   313  
   314   **accessToken** | **optional.String**| 用户授权码 | 
   315  
   316  ### Return type
   317  
   318  [**CodeForksHistory**](CodeForksHistory.md)
   319  
   320  ### Authorization
   321  
   322  No authorization required
   323  
   324  ### HTTP request headers
   325  
   326   - **Content-Type**: application/json, multipart/form-data
   327   - **Accept**: application/json
   328  
   329  [[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)
   330  
   331  # **GetV5GistsIdForks**
   332  > CodeForks GetV5GistsIdForks(ctx, id, optional)
   333  获取 Fork 了指定代码片段的列表
   334  
   335  获取 Fork 了指定代码片段的列表
   336  
   337  ### Required Parameters
   338  
   339  Name | Type | Description  | Notes
   340  ------------- | ------------- | ------------- | -------------
   341   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   342    **id** | **string**| 代码片段的ID | 
   343   **optional** | ***GetV5GistsIdForksOpts** | optional parameters | nil if no parameters
   344  
   345  ### Optional Parameters
   346  Optional parameters are passed through a pointer to a GetV5GistsIdForksOpts struct
   347  
   348  Name | Type | Description  | Notes
   349  ------------- | ------------- | ------------- | -------------
   350  
   351   **accessToken** | **optional.String**| 用户授权码 | 
   352   **page** | **optional.Int32**| 当前的页码 | [default to 1]
   353   **perPage** | **optional.Int32**| 每页的数量,最大为 100 | [default to 20]
   354  
   355  ### Return type
   356  
   357  [**CodeForks**](CodeForks.md)
   358  
   359  ### Authorization
   360  
   361  No authorization required
   362  
   363  ### HTTP request headers
   364  
   365   - **Content-Type**: application/json, multipart/form-data
   366   - **Accept**: application/json
   367  
   368  [[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)
   369  
   370  # **GetV5GistsIdStar**
   371  > GetV5GistsIdStar(ctx, id, optional)
   372  判断代码片段是否已Star
   373  
   374  判断代码片段是否已Star
   375  
   376  ### Required Parameters
   377  
   378  Name | Type | Description  | Notes
   379  ------------- | ------------- | ------------- | -------------
   380   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   381    **id** | **string**| 代码片段的ID | 
   382   **optional** | ***GetV5GistsIdStarOpts** | optional parameters | nil if no parameters
   383  
   384  ### Optional Parameters
   385  Optional parameters are passed through a pointer to a GetV5GistsIdStarOpts struct
   386  
   387  Name | Type | Description  | Notes
   388  ------------- | ------------- | ------------- | -------------
   389  
   390   **accessToken** | **optional.String**| 用户授权码 | 
   391  
   392  ### Return type
   393  
   394   (empty response body)
   395  
   396  ### Authorization
   397  
   398  No authorization required
   399  
   400  ### HTTP request headers
   401  
   402   - **Content-Type**: application/json, multipart/form-data
   403   - **Accept**: application/json
   404  
   405  [[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)
   406  
   407  # **GetV5GistsPublic**
   408  > []Code GetV5GistsPublic(ctx, optional)
   409  获取公开的代码片段
   410  
   411  获取公开的代码片段
   412  
   413  ### Required Parameters
   414  
   415  Name | Type | Description  | Notes
   416  ------------- | ------------- | ------------- | -------------
   417   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   418   **optional** | ***GetV5GistsPublicOpts** | optional parameters | nil if no parameters
   419  
   420  ### Optional Parameters
   421  Optional parameters are passed through a pointer to a GetV5GistsPublicOpts struct
   422  
   423  Name | Type | Description  | Notes
   424  ------------- | ------------- | ------------- | -------------
   425   **accessToken** | **optional.String**| 用户授权码 | 
   426   **since** | **optional.String**| 起始的更新时间,要求时间格式为 ISO 8601 | 
   427   **page** | **optional.Int32**| 当前的页码 | [default to 1]
   428   **perPage** | **optional.Int32**| 每页的数量,最大为 100 | [default to 20]
   429  
   430  ### Return type
   431  
   432  [**[]Code**](Code.md)
   433  
   434  ### Authorization
   435  
   436  No authorization required
   437  
   438  ### HTTP request headers
   439  
   440   - **Content-Type**: application/json, multipart/form-data
   441   - **Accept**: application/json
   442  
   443  [[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)
   444  
   445  # **GetV5GistsStarred**
   446  > []Code GetV5GistsStarred(ctx, optional)
   447  获取用户Star的代码片段
   448  
   449  获取用户Star的代码片段
   450  
   451  ### Required Parameters
   452  
   453  Name | Type | Description  | Notes
   454  ------------- | ------------- | ------------- | -------------
   455   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   456   **optional** | ***GetV5GistsStarredOpts** | optional parameters | nil if no parameters
   457  
   458  ### Optional Parameters
   459  Optional parameters are passed through a pointer to a GetV5GistsStarredOpts struct
   460  
   461  Name | Type | Description  | Notes
   462  ------------- | ------------- | ------------- | -------------
   463   **accessToken** | **optional.String**| 用户授权码 | 
   464   **since** | **optional.String**| 起始的更新时间,要求时间格式为 ISO 8601 | 
   465   **page** | **optional.Int32**| 当前的页码 | [default to 1]
   466   **perPage** | **optional.Int32**| 每页的数量,最大为 100 | [default to 20]
   467  
   468  ### Return type
   469  
   470  [**[]Code**](Code.md)
   471  
   472  ### Authorization
   473  
   474  No authorization required
   475  
   476  ### HTTP request headers
   477  
   478   - **Content-Type**: application/json, multipart/form-data
   479   - **Accept**: application/json
   480  
   481  [[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)
   482  
   483  # **GetV5UsersUsernameGists**
   484  > []Code GetV5UsersUsernameGists(ctx, username, optional)
   485  获取指定用户的公开代码片段
   486  
   487  获取指定用户的公开代码片段
   488  
   489  ### Required Parameters
   490  
   491  Name | Type | Description  | Notes
   492  ------------- | ------------- | ------------- | -------------
   493   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   494    **username** | **string**| 用户名(username/login) | 
   495   **optional** | ***GetV5UsersUsernameGistsOpts** | optional parameters | nil if no parameters
   496  
   497  ### Optional Parameters
   498  Optional parameters are passed through a pointer to a GetV5UsersUsernameGistsOpts struct
   499  
   500  Name | Type | Description  | Notes
   501  ------------- | ------------- | ------------- | -------------
   502  
   503   **accessToken** | **optional.String**| 用户授权码 | 
   504   **page** | **optional.Int32**| 当前的页码 | [default to 1]
   505   **perPage** | **optional.Int32**| 每页的数量,最大为 100 | [default to 20]
   506  
   507  ### Return type
   508  
   509  [**[]Code**](Code.md)
   510  
   511  ### Authorization
   512  
   513  No authorization required
   514  
   515  ### HTTP request headers
   516  
   517   - **Content-Type**: application/json, multipart/form-data
   518   - **Accept**: application/json
   519  
   520  [[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)
   521  
   522  # **PatchV5GistsGistIdCommentsId**
   523  > CodeComment PatchV5GistsGistIdCommentsId(ctx, gistId, id, body, optional)
   524  修改代码片段的评论
   525  
   526  修改代码片段的评论
   527  
   528  ### Required Parameters
   529  
   530  Name | Type | Description  | Notes
   531  ------------- | ------------- | ------------- | -------------
   532   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   533    **gistId** | **string**| 代码片段的ID | 
   534    **id** | **int32**| 评论的ID | 
   535    **body** | **string**| 评论内容 | 
   536   **optional** | ***PatchV5GistsGistIdCommentsIdOpts** | optional parameters | nil if no parameters
   537  
   538  ### Optional Parameters
   539  Optional parameters are passed through a pointer to a PatchV5GistsGistIdCommentsIdOpts struct
   540  
   541  Name | Type | Description  | Notes
   542  ------------- | ------------- | ------------- | -------------
   543  
   544  
   545  
   546   **accessToken** | **optional.String**| 用户授权码 | 
   547  
   548  ### Return type
   549  
   550  [**CodeComment**](CodeComment.md)
   551  
   552  ### Authorization
   553  
   554  No authorization required
   555  
   556  ### HTTP request headers
   557  
   558   - **Content-Type**: application/json, multipart/form-data
   559   - **Accept**: application/json
   560  
   561  [[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)
   562  
   563  # **PatchV5GistsId**
   564  > CodeForksHistory PatchV5GistsId(ctx, id, optional)
   565  修改代码片段
   566  
   567  修改代码片段
   568  
   569  ### Required Parameters
   570  
   571  Name | Type | Description  | Notes
   572  ------------- | ------------- | ------------- | -------------
   573   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   574    **id** | **string**| 代码片段的ID | 
   575   **optional** | ***PatchV5GistsIdOpts** | optional parameters | nil if no parameters
   576  
   577  ### Optional Parameters
   578  Optional parameters are passed through a pointer to a PatchV5GistsIdOpts struct
   579  
   580  Name | Type | Description  | Notes
   581  ------------- | ------------- | ------------- | -------------
   582  
   583   **accessToken** | **optional.String**| 用户授权码 | 
   584   **files** | **optional.Interface of *os.File**| Hash形式的代码片段文件名以及文件内容。如: { \"file1.txt\": { \"content\": \"String file contents\" } } | 
   585   **description** | **optional.String**| 代码片段描述,1~30个字符 | 
   586   **public** | **optional.Bool**| 公开/私有,默认: 私有 | 
   587  
   588  ### Return type
   589  
   590  [**CodeForksHistory**](CodeForksHistory.md)
   591  
   592  ### Authorization
   593  
   594  No authorization required
   595  
   596  ### HTTP request headers
   597  
   598   - **Content-Type**: application/json, multipart/form-data
   599   - **Accept**: application/json
   600  
   601  [[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)
   602  
   603  # **PostV5Gists**
   604  > []CodeForksHistory PostV5Gists(ctx, files, description, optional)
   605  创建代码片段
   606  
   607  创建代码片段
   608  
   609  ### Required Parameters
   610  
   611  Name | Type | Description  | Notes
   612  ------------- | ------------- | ------------- | -------------
   613   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   614    **files** | ***os.File**| Hash形式的代码片段文件名以及文件内容。如: { \"file1.txt\": { \"content\": \"String file contents\" } } | 
   615    **description** | **string**| 代码片段描述,1~30个字符 | 
   616   **optional** | ***PostV5GistsOpts** | optional parameters | nil if no parameters
   617  
   618  ### Optional Parameters
   619  Optional parameters are passed through a pointer to a PostV5GistsOpts struct
   620  
   621  Name | Type | Description  | Notes
   622  ------------- | ------------- | ------------- | -------------
   623  
   624  
   625   **accessToken** | **optional.String**| 用户授权码 | 
   626   **public** | **optional.Bool**| 公开/私有,默认: 私有 | 
   627  
   628  ### Return type
   629  
   630  [**[]CodeForksHistory**](CodeForksHistory.md)
   631  
   632  ### Authorization
   633  
   634  No authorization required
   635  
   636  ### HTTP request headers
   637  
   638   - **Content-Type**: application/json, multipart/form-data
   639   - **Accept**: application/json
   640  
   641  [[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)
   642  
   643  # **PostV5GistsGistIdComments**
   644  > CodeComment PostV5GistsGistIdComments(ctx, gistId, body, optional)
   645  增加代码片段的评论
   646  
   647  增加代码片段的评论
   648  
   649  ### Required Parameters
   650  
   651  Name | Type | Description  | Notes
   652  ------------- | ------------- | ------------- | -------------
   653   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   654    **gistId** | **string**| 代码片段的ID | 
   655    **body** | **string**| 评论内容 | 
   656   **optional** | ***PostV5GistsGistIdCommentsOpts** | optional parameters | nil if no parameters
   657  
   658  ### Optional Parameters
   659  Optional parameters are passed through a pointer to a PostV5GistsGistIdCommentsOpts struct
   660  
   661  Name | Type | Description  | Notes
   662  ------------- | ------------- | ------------- | -------------
   663  
   664  
   665   **accessToken** | **optional.String**| 用户授权码 | 
   666  
   667  ### Return type
   668  
   669  [**CodeComment**](CodeComment.md)
   670  
   671  ### Authorization
   672  
   673  No authorization required
   674  
   675  ### HTTP request headers
   676  
   677   - **Content-Type**: application/json, multipart/form-data
   678   - **Accept**: application/json
   679  
   680  [[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)
   681  
   682  # **PostV5GistsIdForks**
   683  > PostV5GistsIdForks(ctx, id, optional)
   684  Fork代码片段
   685  
   686  Fork代码片段
   687  
   688  ### Required Parameters
   689  
   690  Name | Type | Description  | Notes
   691  ------------- | ------------- | ------------- | -------------
   692   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   693    **id** | **string**| 代码片段的ID | 
   694   **optional** | ***PostV5GistsIdForksOpts** | optional parameters | nil if no parameters
   695  
   696  ### Optional Parameters
   697  Optional parameters are passed through a pointer to a PostV5GistsIdForksOpts struct
   698  
   699  Name | Type | Description  | Notes
   700  ------------- | ------------- | ------------- | -------------
   701  
   702   **accessToken** | **optional.String**| 用户授权码 | 
   703  
   704  ### Return type
   705  
   706   (empty response body)
   707  
   708  ### Authorization
   709  
   710  No authorization required
   711  
   712  ### HTTP request headers
   713  
   714   - **Content-Type**: application/json, multipart/form-data
   715   - **Accept**: application/json
   716  
   717  [[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)
   718  
   719  # **PutV5GistsIdStar**
   720  > PutV5GistsIdStar(ctx, id, optional)
   721  Star代码片段
   722  
   723  Star代码片段
   724  
   725  ### Required Parameters
   726  
   727  Name | Type | Description  | Notes
   728  ------------- | ------------- | ------------- | -------------
   729   **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   730    **id** | **string**| 代码片段的ID | 
   731   **optional** | ***PutV5GistsIdStarOpts** | optional parameters | nil if no parameters
   732  
   733  ### Optional Parameters
   734  Optional parameters are passed through a pointer to a PutV5GistsIdStarOpts struct
   735  
   736  Name | Type | Description  | Notes
   737  ------------- | ------------- | ------------- | -------------
   738  
   739   **accessToken** | **optional.String**| 用户授权码 | 
   740  
   741  ### Return type
   742  
   743   (empty response body)
   744  
   745  ### Authorization
   746  
   747  No authorization required
   748  
   749  ### HTTP request headers
   750  
   751   - **Content-Type**: application/json, multipart/form-data
   752   - **Accept**: application/json
   753  
   754  [[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)
   755