func GetAllRecipientsFromList(page, pageSize, listID int, apiKey string) ([]*Recipient, error) {
	queries := map[string]string{
		"list_id":   strconv.Itoa(listID),
		"page":      strconv.Itoa(page),
		"page_size": strconv.Itoa(pageSize),
	}

	path := QueryBuilder("/contactdb/lists/"+strconv.Itoa(listID)+"/recipients", queries)
	response, err := SendGETRequest(apiKey, path)
	if err != nil {
		return nil, err
	}

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

	return recipients.Recipients, nil
}
// GetAllRecipientsFromList will get all recipients from a specfic list. (GET)
GetAllRecipientsFromList will get all recipients from a specfic list. (GET)
// GetAllRecipientsFromList will get all recipients from a specfic list . ( GET )
func GetAllRecipientsFromList(page, pageSize, listID int, apiKey string) ([]*Recipient, error) {
	queries := map[string]string{
		"list_id":   strconv.Itoa(listID),
		"page":      strconv.Itoa(page),
		"page_size": strconv.Itoa(pageSize),
	}
	path := QueryBuilder("/contactdb/lists/"+strconv.Itoa(listID)+"/recipients", queries)
	response, err := SendGETRequest(apiKey, path)
	if err != nil {
		return nil, err
	}
	recipients := &recipientList{}
	err = json.Unmarshal(response, recipients)
	if err != nil {
		return nil, err
	}
	return recipients.Recipients, nil
}
func GetAllRecipientsFromList ( page , pageSize , listID int , apiKey string ) ( [ ] * Recipient , error ) { queries := map [ string ] string { " " : strconv . Itoa ( listID ) , " " : strconv . Itoa ( page ) , " " : strconv . Itoa ( pageSize ) , } path := QueryBuilder ( " " + strconv . Itoa ( listID ) + " " , queries ) response , err := SendGETRequest ( apiKey , path ) if err != nil { return nil , err } recipients := & recipientList { } err = json . Unmarshal ( response , recipients ) if err != nil { return nil , err } return recipients . Recipients , nil }
GetAllRecipientsFromList will get all recipients from a specfic list.
GetAllRecipientsFromList will get all recipients from a specfic list .