Платформа ЦРНП "Мирокод" для разработки проектов
https://git.mirocod.ru
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
374 B
15 lines
374 B
7 years ago
|
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
|
||
|
}
|