func GetAllSegments(apiKey string) ([]*Segment, error) {
	response, err := SendGETRequest(apiKey, "/contactdb/segments")
	if err != nil {
		return nil, err
	}

	segments := &segmentList{}
	err = json.Unmarshal(response, segments)
	if err != nil {
		return nil, err
	}

	return segments.Segments, nil
}
// GetAllSegments will return all of your segments. (GET)
GetAllSegments will return all of your segments. (GET)
// GetAllSegments will return all of your segments . ( GET )
func GetAllSegments(apiKey string) ([]*Segment, error) {
	response, err := SendGETRequest(apiKey, "/contactdb/segments")
	if err != nil {
		return nil, err
	}
	segments := &segmentList{}
	err = json.Unmarshal(response, segments)
	if err != nil {
		return nil, err
	}
	return segments.Segments, nil
}
func GetAllSegments ( apiKey string ) ( [ ] * Segment , error ) { response , err := SendGETRequest ( apiKey , " " ) if err != nil { return nil , err } segments := & segmentList { } err = json . Unmarshal ( response , segments ) if err != nil { return nil , err } return segments . Segments , nil }
GetAllSegments will return all of your segments.
GetAllSegments will return all of your segments .