MM-16500: Adds ability to retrieve the total count of teams via the API. (#11325)
Этот коммит содержится в:
коммит произвёл
Miguel de la Cruz
родитель
49d5037a89
Коммит
c07b7046ca
@@ -62,6 +62,11 @@ type Invites struct {
|
||||
Invites []map[string]string `json:"invites"`
|
||||
}
|
||||
|
||||
type TeamsWithCount struct {
|
||||
Teams []*Team `json:"teams"`
|
||||
TotalCount int64 `json:"total_count"`
|
||||
}
|
||||
|
||||
func InvitesFromJson(data io.Reader) *Invites {
|
||||
var o *Invites
|
||||
json.NewDecoder(data).Decode(&o)
|
||||
@@ -108,6 +113,17 @@ func TeamListToJson(t []*Team) string {
|
||||
return string(b)
|
||||
}
|
||||
|
||||
func TeamsWithCountToJson(tlc *TeamsWithCount) []byte {
|
||||
b, _ := json.Marshal(tlc)
|
||||
return b
|
||||
}
|
||||
|
||||
func TeamsWithCountFromJson(data io.Reader) *TeamsWithCount {
|
||||
var twc *TeamsWithCount
|
||||
json.NewDecoder(data).Decode(&twc)
|
||||
return twc
|
||||
}
|
||||
|
||||
func TeamListFromJson(data io.Reader) []*Team {
|
||||
var teams []*Team
|
||||
json.NewDecoder(data).Decode(&teams)
|
||||
|
||||
Ссылка в новой задаче
Block a user