// ListTeamMembers gets all team members
//
// API doc: https://developers.miro.com/reference#get-team-user-connections
ListTeamMembers gets all team members


// ListTeamMembers gets all team members // // API doc : https : // developers . miro . com / reference#get - team - user - connections
func (s *TeamsService) ListTeamMembers(ctx context.Context, id string) (*ListTeamMembersResponse, error) {
	req, err := s.client.NewGetRequest(fmt.Sprintf("%s/%s", teamsPath, id))
	if err != nil {
		return nil, err
	}
	resp, err := s.client.Do(ctx, req)
	if err != nil {
		return nil, err
	}
	if http.StatusBadRequest <= resp.StatusCode && resp.StatusCode <= http.StatusInsufficientStorage {
		return nil, fmt.Errorf("status code not expected, got:%d", resp.StatusCode)
	}
	t := &ListTeamMembersResponse{}
	if err := json.NewDecoder(resp.Body).Decode(t); err != nil {
		return nil, err
	}
	return t, nil
}
func ( s * TeamsService ) ListTeamMembers ( ctx context . Context , id string ) ( * ListTeamMembersResponse , error ) { req , err := s . client . NewGetRequest ( fmt . Sprintf ( " " , teamsPath , id ) ) if err != nil { return nil , err } resp , err := s . client . Do ( ctx , req ) if err != nil { return nil , err } if http . StatusBadRequest <= resp . StatusCode && resp . StatusCode <= http . StatusInsufficientStorage { return nil , fmt . Errorf ( " " , resp . StatusCode ) } t := & ListTeamMembersResponse { } if err := json . NewDecoder ( resp . Body ) . Decode ( t ) ; err != nil { return nil , err } return t , nil }
ListTeamMembers gets all team members
ListTeamMembers gets all team members