24 lines
365 B
Go
24 lines
365 B
Go
package anilibria
|
|
|
|
import (
|
|
"encoding/json"
|
|
"errors"
|
|
|
|
"git.thefoxon.ru/anilibria/anilibria-go/model"
|
|
)
|
|
|
|
func GetTeam() (team *model.Team, err error) {
|
|
|
|
reqBody, status, err := request("GET", "/v3/team", nil)
|
|
|
|
if status != 200 {
|
|
return nil, errors.New(errorFetchTeam)
|
|
}
|
|
|
|
if err = json.Unmarshal(reqBody, &team); err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return
|
|
}
|