Exemplo n.º 1
0
    public static int ListsInterestGroupAdd(SqlString apikey, SqlString list_id, SqlString group_name, SqlInt32 grouping_id)
    {
        try
        {
            MailChimpManager mc = new MailChimpManager(apikey.ToString());

            CompleteResult result = mc.AddListInterestGroup(list_id.ToString(), group_name.ToString(), grouping_id.Value);

            SqlDataRecord record = new SqlDataRecord(CompleteResultsMetaData);
            record.SetBoolean(0, result.Complete);

            SqlContext.Pipe.Send(record);
        }
        catch (Exception ex)
        {
            SqlContext.Pipe.Send(ex.Message);
            return(1);
        }
        return(0);
    }