//ListServers queries data of all servers
ListServers queries data of all servers
// ListServers queries data of all servers
func (s *ServerServiceOp) ListServers(ctx context.Context) ([]Server, *Response, error) {
	path := serverBasePath
	req, err := s.client.NewRequest(ctx, http.MethodGet, path, nil)
	if err != nil {
		return nil, nil, err
	}
	var results []Server
	var rootItems []serversRoot
	resp, err := s.client.Do(ctx, req, &rootItems)
	if err != nil {
		return nil, resp, err
	}
	for _, item := range rootItems {
		results = append(results, item.Server)
	}
	return results, resp, err
}
func ( s * ServerServiceOp ) ListServers ( ctx context . Context ) ( [ ] Server , * Response , error ) { path := serverBasePath req , err := s . client . NewRequest ( ctx , http . MethodGet , path , nil ) if err != nil { return nil , nil , err } var results [ ] Server var rootItems [ ] serversRoot resp , err := s . client . Do ( ctx , req , & rootItems ) if err != nil { return nil , resp , err } for _ , item := range rootItems { results = append ( results , item . Server ) } return results , resp , err }
ListServers queries data of all servers
ListServers queries data of all servers