gitee.com/openeuler/go-gitee@v0.0.0-20220530104019-3af895bc380c/docs/SearchApi.md (about) 1 # \SearchApi 2 3 All URIs are relative to *https://gitee.com/api* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**GetV5SearchGists**](SearchApi.md#GetV5SearchGists) | **Get** /v5/search/gists | 搜索代码片段 8 [**GetV5SearchIssues**](SearchApi.md#GetV5SearchIssues) | **Get** /v5/search/issues | 搜索 Issues 9 [**GetV5SearchRepositories**](SearchApi.md#GetV5SearchRepositories) | **Get** /v5/search/repositories | 搜索仓库 10 [**GetV5SearchUsers**](SearchApi.md#GetV5SearchUsers) | **Get** /v5/search/users | 搜索用户 11 12 13 # **GetV5SearchGists** 14 > []Code GetV5SearchGists(ctx, q, optional) 15 搜索代码片段 16 17 搜索代码片段 18 19 ### Required Parameters 20 21 Name | Type | Description | Notes 22 ------------- | ------------- | ------------- | ------------- 23 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 24 **q** | **string**| 搜索关键字 | 25 **optional** | ***GetV5SearchGistsOpts** | optional parameters | nil if no parameters 26 27 ### Optional Parameters 28 Optional parameters are passed through a pointer to a GetV5SearchGistsOpts struct 29 30 Name | Type | Description | Notes 31 ------------- | ------------- | ------------- | ------------- 32 33 **accessToken** | **optional.String**| 用户授权码 | 34 **page** | **optional.Int32**| 当前的页码 | [default to 1] 35 **perPage** | **optional.Int32**| 每页的数量,最大为 100 | [default to 20] 36 **language** | **optional.String**| 筛选指定语言的代码片段 | 37 **owner** | **optional.String**| 筛选所属用户 (username/login) 的代码片段 | 38 **sort** | **optional.String**| 排序字段,created_at(创建时间)、updated_at(更新时间)、notes_count(评论数)、stars_count(收藏数)、forks_count(Fork 数),默认为最佳匹配 | 39 **order** | **optional.String**| 排序顺序: desc(default)、asc | [default to desc] 40 41 ### Return type 42 43 [**[]Code**](Code.md) 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 # **GetV5SearchIssues** 57 > []Issue GetV5SearchIssues(ctx, q, optional) 58 搜索 Issues 59 60 搜索 Issues 61 62 ### Required Parameters 63 64 Name | Type | Description | Notes 65 ------------- | ------------- | ------------- | ------------- 66 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 67 **q** | **string**| 搜索关键字 | 68 **optional** | ***GetV5SearchIssuesOpts** | optional parameters | nil if no parameters 69 70 ### Optional Parameters 71 Optional parameters are passed through a pointer to a GetV5SearchIssuesOpts struct 72 73 Name | Type | Description | Notes 74 ------------- | ------------- | ------------- | ------------- 75 76 **accessToken** | **optional.String**| 用户授权码 | 77 **page** | **optional.Int32**| 当前的页码 | [default to 1] 78 **perPage** | **optional.Int32**| 每页的数量,最大为 100 | [default to 20] 79 **repo** | **optional.String**| 筛选指定仓库 (path, e.g. oschina/git-osc) 的 issues | 80 **language** | **optional.String**| 筛选指定语言的 issues | 81 **label** | **optional.String**| 筛选指定标签的 issues | 82 **state** | **optional.String**| 筛选指定状态的 issues, open(开启)、closed(完成)、rejected(拒绝) | 83 **author** | **optional.String**| 筛选指定创建者 (username/login) 的 issues | 84 **assignee** | **optional.String**| 筛选指定负责人 (username/login) 的 issues | 85 **sort** | **optional.String**| 排序字段,created_at(创建时间)、last_push_at(更新时间)、notes_count(评论数),默认为最佳匹配 | 86 **order** | **optional.String**| 排序顺序: desc(default)、asc | [default to desc] 87 88 ### Return type 89 90 [**[]Issue**](Issue.md) 91 92 ### Authorization 93 94 No authorization required 95 96 ### HTTP request headers 97 98 - **Content-Type**: application/json, multipart/form-data 99 - **Accept**: application/json 100 101 [[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) 102 103 # **GetV5SearchRepositories** 104 > []Project GetV5SearchRepositories(ctx, q, optional) 105 搜索仓库 106 107 搜索仓库 108 109 ### Required Parameters 110 111 Name | Type | Description | Notes 112 ------------- | ------------- | ------------- | ------------- 113 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 114 **q** | **string**| 搜索关键字 | 115 **optional** | ***GetV5SearchRepositoriesOpts** | optional parameters | nil if no parameters 116 117 ### Optional Parameters 118 Optional parameters are passed through a pointer to a GetV5SearchRepositoriesOpts struct 119 120 Name | Type | Description | Notes 121 ------------- | ------------- | ------------- | ------------- 122 123 **accessToken** | **optional.String**| 用户授权码 | 124 **page** | **optional.Int32**| 当前的页码 | [default to 1] 125 **perPage** | **optional.Int32**| 每页的数量,最大为 100 | [default to 20] 126 **owner** | **optional.String**| 筛选指定空间地址(企业、组织或个人的地址 path) 的仓库 | 127 **fork** | **optional.Bool**| 是否搜索含 fork 的仓库,默认:否 | 128 **language** | **optional.String**| 筛选指定语言的仓库 | 129 **sort** | **optional.String**| 排序字段,created_at(创建时间)、last_push_at(更新时间)、stars_count(收藏数)、forks_count(Fork 数)、watches_count(关注数),默认为最佳匹配 | 130 **order** | **optional.String**| 排序顺序: desc(default)、asc | [default to desc] 131 132 ### Return type 133 134 [**[]Project**](Project.md) 135 136 ### Authorization 137 138 No authorization required 139 140 ### HTTP request headers 141 142 - **Content-Type**: application/json, multipart/form-data 143 - **Accept**: application/json 144 145 [[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) 146 147 # **GetV5SearchUsers** 148 > []User GetV5SearchUsers(ctx, q, optional) 149 搜索用户 150 151 搜索用户 152 153 ### Required Parameters 154 155 Name | Type | Description | Notes 156 ------------- | ------------- | ------------- | ------------- 157 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 158 **q** | **string**| 搜索关键字 | 159 **optional** | ***GetV5SearchUsersOpts** | optional parameters | nil if no parameters 160 161 ### Optional Parameters 162 Optional parameters are passed through a pointer to a GetV5SearchUsersOpts struct 163 164 Name | Type | Description | Notes 165 ------------- | ------------- | ------------- | ------------- 166 167 **accessToken** | **optional.String**| 用户授权码 | 168 **page** | **optional.Int32**| 当前的页码 | [default to 1] 169 **perPage** | **optional.Int32**| 每页的数量,最大为 100 | [default to 20] 170 **sort** | **optional.String**| 排序字段,joined_at(注册时间),默认为最佳匹配 | 171 **order** | **optional.String**| 排序顺序: desc(default)、asc | [default to desc] 172 173 ### Return type 174 175 [**[]User**](User.md) 176 177 ### Authorization 178 179 No authorization required 180 181 ### HTTP request headers 182 183 - **Content-Type**: application/json, multipart/form-data 184 - **Accept**: application/json 185 186 [[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) 187