mirror of
https://gitea.com/gitea/tea.git
synced 2025-09-19 10:12:54 +02:00
Add Makefile / .drone.yml, use go module with vendor (#20)
* add Makefile / .drone.yml, use go module with vendor * Update .drone.yml Co-Authored-By: lunny <xiaolunwen@gmail.com>
This commit is contained in:
14
vendor/code.gitea.io/sdk/gitea/user_search.go
generated
vendored
Normal file
14
vendor/code.gitea.io/sdk/gitea/user_search.go
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
package gitea
|
||||
|
||||
import "fmt"
|
||||
|
||||
type searchUsersResponse struct {
|
||||
Users []*User `json:"data"`
|
||||
}
|
||||
|
||||
// SearchUsers finds users by query
|
||||
func (c *Client) SearchUsers(query string, limit int) ([]*User, error) {
|
||||
resp := new(searchUsersResponse)
|
||||
err := c.getParsedResponse("GET", fmt.Sprintf("/users/search?q=%s&limit=%d", query, limit), nil, nil, &resp)
|
||||
return resp.Users, err
|
||||
}
|
Reference in New Issue
Block a user