func UpdateContactList(listID int, newName, apiKey string) (*ContactList, error) {
	byteArr, err := json.Marshal(ContactList{
		Name: newName,
	})
	if err != nil {
		return nil, err
	}

	queries := map[string]string{
		"list_id": strconv.Itoa(listID),
	}

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

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

	return contactList, nil
}
// UpdateContactList updates a contact list. (PATCH)
UpdateContactList updates a contact list. (PATCH)
// UpdateContactList updates a contact list . ( PATCH )
func UpdateContactList(listID int, newName, apiKey string) (*ContactList, error) {
	byteArr, err := json.Marshal(ContactList{
		Name: newName,
	})
	if err != nil {
		return nil, err
	}
	queries := map[string]string{
		"list_id": strconv.Itoa(listID),
	}
	path := QueryBuilder("/contactdb/lists/"+strconv.Itoa(listID), queries)
	response, err := SendPATCHRequest(apiKey, path, string(byteArr))
	if err != nil {
		return nil, err
	}
	contactList := &ContactList{}
	err = json.Unmarshal(response, contactList)
	if err != nil {
		return nil, err
	}
	return contactList, nil
}
func UpdateContactList ( listID int , newName , apiKey string ) ( * ContactList , error ) { byteArr , err := json . Marshal ( ContactList { Name : newName , } ) if err != nil { return nil , err } queries := map [ string ] string { " " : strconv . Itoa ( listID ) , } path := QueryBuilder ( " " + strconv . Itoa ( listID ) , queries ) response , err := SendPATCHRequest ( apiKey , path , string ( byteArr ) ) if err != nil { return nil , err } contactList := & ContactList { } err = json . Unmarshal ( response , contactList ) if err != nil { return nil , err } return contactList , nil }
UpdateContactList updates a contact list.
UpdateContactList updates a contact list .