// ListSlaves returns list of slaves.
ListSlaves returns list of slaves.
// ListSlaves returns list of slaves .
func (c *Client) ListSlaves() ([]Slave, error) {
	body, err := c.doRequest(c.slavesEndpoint())
	if err != nil {
		return []Slave{}, err
	}
	var slaves SlavesWrap
	err = json.Unmarshal(body, &slaves)
	if err != nil {
		return []Slave{}, err
	}
	return slaves.List, nil
}
func ( c * Client ) ListSlaves ( ) ( [ ] Slave , error ) { body , err := c . doRequest ( c . slavesEndpoint ( ) ) if err != nil { return [ ] Slave { } , err } var slaves SlavesWrap err = json . Unmarshal ( body , & slaves ) if err != nil { return [ ] Slave { } , err } return slaves . List , nil }
ListSlaves returns list of slaves.
ListSlaves returns list of slaves .