Constant Contact API

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Constant Contact API

Black Night Lists
Hi,

I have been working through creating an automated system which is to upload an updated email content on a daily basis to Constant Contact. However, I have hit a stumbling block as in order to update the content you need to use a PUT request (http://community.constantcontact.com/t5/Documentation/Updating-a-Campaign/ba-p/25045) and of course I realised that my planned method of using include_url is not going to work as it doesn't support it.

So in a nutshell has anyone created a Constant Contact wrapper for their API? Or have any suggestions on how I can proceed with this?


Regards

Stephen Thirlwell
Black Night Software
LassoSoft Hosting Partner • Certified Lasso Developer
http://www.blacknight.co.uk







#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Constant Contact API

fletcher sandbeck-2

On Sep 15, 2011, at 4:42 AM, Black Night Lists wrote:

> I have been working through creating an automated system which is to upload an updated email content on a daily basis to Constant Contact. However, I have hit a stumbling block as in order to update the content you need to use a PUT request (http://community.constantcontact.com/t5/Documentation/Updating-a-Campaign/ba-p/25045) and of course I realised that my planned method of using include_url is not going to work as it doesn't support it.
>
> So in a nutshell has anyone created a Constant Contact wrapper for their API? Or have any suggestions on how I can proceed with this?

I've copied what I'm using below.  It doesn't implement the whole API, but other functions would be implemented similarly.  This allows you to find the defined lists, show contacts subscribed to a list, what lists a contact is subscribed to, create a new contact, etc.

Finding all the lists is done like this.  I store them in a global since they don't change very often.

  if(!global_defined('cc_lists'));
    global('cc_lists' = cc_findlists());
  /if;
  var('skip_lists' = array('bounced','removed','do not mail','active'));

I store the cc_id for the user in a local record.  It is a path so if I see it I fetch it, otherwise I find the contact and store the cc_id locally for later.  If the user doesn't have a record in CC then I create a new contact.

  if(var('cc_id') >> '/contacts/');
    var('cc_contact' = cc_getcontact($cc_id));
  else;
    var('cc_constant' = cc_findcontacts('email'=$user_email));
    if($cc_constant->size > 0);
      var('cc_id' = $cc_constant->keys->first);
      // STORE LOCALLY (NOT SHOWN)
      var('cc_contact' = cc_getcontact($cc_id));
    else;
      var('cc_contact' = cc_newcontact());
      $cc_contact->insert('emailaddress' = $user_email);
      $cc_contact->insert('emailtype' = 'html');
      $cc_contact->insert('status' = 'Active');
    /if;
  /if;

And then I display a form with checkboxes so a user can subscribe or unsubcribe like this:

  <form action="[response_filepath]" method="post">
    <p><input type="radio" name="status" value="Do Not Mail"[$cc_contact->find('status') !>> 'active' ? ' checked="checked"'] /> Unsubscribe me from all mailings.</p>
    <p><input type="radio" name="status" value="Active"[$cc_contact->find('status') >> 'active' ? ' checked="checked"'] /> I wish to receive the following occasional newsletters:</p>
    <ul>[iterate($cc_lists->keys, var('id'))][var('list' = $cc_lists->find($id))][$skip_lists >> $list->find('name') ? loop_continue]
      <li class="none" style="margin-left:2em;"><input type="checkbox" name="lists" value="[$id]"[$cc_contact->find('lists') >> $id ? ' checked="checked"'] />[encode_html($cc_lists->find($id)->find('name'))]</li>[/iterate]
    </ul>
    <p>Preferred email format <input type="radio" name="EmailType" value="html"[$cc_contact->find('emailtype') >> 'html' ? ' checked="checked"'] /> HTML <input type="radio" name="EmailType" value="text"[$cc_contact->find('emailtype') >> 'text' ? ' checked="checked"'] /> Text
    <p>Email Address: [encode_html($cc_contact->find('emailaddress'))] <a href="/account/email.lasso"><b>Change</b></a></p>
    <p><input type="submit" name="action" value="Save Changes" /></p>
  </form>

And then when that form is submitted the code looks like this:

  if(action_param('action') >> 'save');
    if(action_param('status') >> 'active');
      $cc_contact->insert('optinsource' = 'ACTION_BY_CONTACT');
      $cc_contact->insert('status' = 'Active');
      $cc_contact->insert('emailtype' = action_param('emailtype'));
      var('lists' = array);
      loop(action_param('lists',-count));
        #lists->insert(action_param('lists', loop_count));
      /loop;
      $cc_contact->insert('lists'=#lists);
      null(cc_putcontact($cc_contact));
    else($cc_contact->find('id') != 'new');
      null(cc_deletecontact($cc_contact));
    else;
      // Nothing To Do
    /if;
  /if;

And, again, the include which has the actual API implementation is below.  In my implementation the CC username, password, and apikey are hardcoded into the cc_include tag. And also I see the username is hardcoded into the new contact tag.  Ideally these would be factored out a little.

Anyway, a bit messy, but I hope it helps give the idea.

[fletcher]


<?lassoscript

  // Constant Contact API
  //
  // Requires http://tagswap.net/response_localfolder/
  // Requires http://tagswap.net/shell/
  //

  // cc_include('contacts',-params=array('email'='[hidden email]'));
  // cc_include('contacts/1',-put='<entry>...</entry>');
  define_tag('cc_include', -required='path', -optional='method', -optional='params', -optional='headers');

    local('username' = 'YOUR USERNAME');
    local('password' = 'YOUR PASSWORD');
    local('apikey' = 'YOUR API KEY');

    // Headers
    !local_defined('method') ? local('method' = 'GET');
    local('hdrs' = array);
    local_defined('headers') ? #hdrs->insertfrom(#headers->iterator);

    // URL
    if(#path->beginswith('https'));
      local('url' = #path);
    else(#path->beginswith('http'));
      local('url' = string_replace(#path, -find='http://', -replace='https://'));
    else;
      local('url' = 'https://api.constantcontact.com/ws/customers/' + #username + (!#path->beginswith('/') ? '/') + #path + '?');
    /if;
    iterate(local('params'),local('param'));
      !#param->isa('pair') ? loop_continue;
      #param->second->isa('date') ? #param->second->setformat('%DT%TZ');
      #url += encode_stricturl(#param->first) + '=' + encode_stricturl(#param->second) + '&';
    /iterate;
    #url->removetrailing('&') & removetrailing('?');

    // Verb
    var('cc_error' = 'No Error');
    var('cc_raw' = '');
    if(#method == 'get');
      protect;
        var('cc_raw' = include_url(#url, -username=#apikey + '%' + #username, -password=#password, -sendmimeheaders=#hdrs, -retrievemimeheaders='cc_hdr'));
        handle_error;
          var('cc_error' = error_msg);
        /handle_error;
      /protect;
    else(#method == 'post');
      #hdrs->removeall('content-type') & insert('Content-Type' = 'application/atom+xml');
      protect;
        var('cc_raw' = include_url(#url, -username=#apikey + '%' + #username, -password=#password, -postparams=local('params'), -sendmimeheaders=#hdrs, -retrievemimeheaders='cc_hdr'));
        handle_error;
          var('cc_error' = error_msg);
        /handle_error;
      /protect;
    else(#method == 'delete');
      protect;
        shell('curl --silent --user ' + #apikey + '%' + #username + ':' + #password + ' --request DELETE ' + #url);
        handle_error;
          var('cc_error' = error_msg);
        /handle_error;
      /protect;
    else(#method == 'put');
      protect;
        shell('curl --silent --header "Content-Type: application/atom+xml" --user ' + #apikey + '%' + #username + ':' + #password + ' --request PUT --data "' + encode_sql(local('params')) + '" ' + #url);
        handle_error;
          var('cc_error' = error_msg);
        /handle_error;
      /protect;
    else;
      error(-1, 'Unknown method (' + #method + ')');
    /if;

    // XML
    var('cc_xml'=xml);
    if(var('cc_raw') != '');
      protect;
        var('cc_xml' = xml($cc_raw));
        handle_error;
          var('cc_error' = error_msg);
        /handle_error;
      /protect;
    /if;
    return(@$cc_xml);
  /define_tag;

  // cc_findlists()
  // finds all contact lists
  define_tag('cc_findlists');
    var_defined('__cc_findlists__') ? return($__cc_findlists__);
    var('__cc_findlists__' = map);
    iterate(cc_include('lists', -params=params)->extract('//*[local-name()="entry"]'),local('x'));
      local('list' = xml(string(#x)));
      local('id' = #list->extractone('//*[local-name()="id"]')->contents);
      local('temp' = map(
        'id' = #id,
        'name' = #list->extractone('//*[local-name()="Name"]')->contents,
        'shortname' = #list->extractone('//*[local-name()="ShortName"]')->contents,
        'template' = '<ContactList id="' + #id + '"></ContactList>'));
      $__cc_findlists__->insert(#id = #temp);
    /iterate;
    return($__cc_findlists__);
  /define_tag;

  // cc_findcontacts('email'='[hidden email]') one email
  // cc_findcontacts('email'='[hidden email]', 'email'='[hidden email]') multiple emails
  // cc_findcontacts('updatedsince'=date, 'listid'='###') one list
  // cc_findcontacts('updatedsince'=date, 'listtype'='active') subscribers
  // cc_findcontacts('updatedsince'=date, 'listtype'='removed') not subscribed
  // cc_findcontacts('updatedsince'=date, 'listtype'='do-not-mail') opted out
  // cc_findcontacts() all contacts
  // Returns max 50 records
  define_tag('cc_findcontacts');
    var('__cc_findcontacts__' = map);
    local('xml' = cc_include('contacts', -params=params));
    iterate(#xml->extract('//*[local-name()="entry"]'),local('x'));
      local('list' = xml(string(#x)));
      local('id' = #list->extractone('//*[local-name()="id"]')->contents);
      local('temp' = map(
        'id' = #id,
        'status' = if_null(#list->extractone('//*[local-name()="Status"]'),xml)->contents,
        'emailaddress' = if_null(#list->extractone('//*[local-name()="EmailAddress"]'),xml)->contents,
        'emailtype' = if_null(#list->extractone('//*[local-name()="EmailType"]'),xml)->contents,
        'name' = if_null(#list->extractone('//*[local-name()="Name"]'),xml)->contents,
        'confirmed' = if_null(#list->extractone('//*[local-name()="Confirmed"]'),xml)->contents,
        'optouttime' = if_null(#list->extractone('//*[local-name()="OptOutTime"]'),xml)->contents,
        'optoutsource' = if_null(#list->extractone('//*[local-name()="OptOutSource"]'),xml)->contents,
        'optintime' = if_null(#list->extractone('//*[local-name()="OptInTime"]'),xml)->contents,
        'optinsource' = if_null(#list->extractone('//*[local-name()="OptInSource"]'),xml)->contents,
        'template' = '<ContactList id="' + #id + '"></ContactList>'));
      $__cc_findcontacts__->insert(#id = #temp);
    /iterate;
    return($__cc_findcontacts__);
  /define_tag;

  // cc_getcontact('35')
  // The ID can be a contact number (35) or the ID attribute of a Contact record
  // cc_getcontact(cc_findcontacts('email'='[hidden email]')->first->getattribute('id'));
  define_tag('cc_getcontact', -required='id');
    if(#id->beginswith('http'));
      local('path' = #id);
    else;
      local('path' = '/contacts/' + #id);
    /if;
    local('cc_xml' = cc_include(#path, -params=params));
    local('entry' = xml(string(#cc_xml->extractone('//*[local-name()="entry"]'))));
    local('output' = map('xml' = #cc_xml, 'id' = #entry->extractone('//*[local-name()="id"]')->contents));
    iterate(#entry->extract('//*[local-name()="Contact"]/*'),local('temp'));
      #temp->name == 'contactlists' ? loop_continue;
      #output->insert(#temp->name = #temp->contents);
    /iterate;
    local('lists' = array);
    iterate(#entry->extract('//*[local-name()="ContactList"]'),local('temp'));
      local('temp_id' = #temp->getattribute('id'));
      #lists->insert(#temp_id);
    //  #lists->insert(#id->split('/')->last = #id);
    /iterate;
    #output->insert('lists' = #lists);
    return(@#output);
  /define_tag;

  // cc_newcontact
  // Returns a minimal template for a new contact
  // Must set EmailAddress and OptInSource before putting
  define_tag('cc_newcontact');
    local('entry' = xml('<?xml version="1.0" encoding="UTF-8"?>
        <entry xmlns="http://www.w3.org/2005/Atom">
          <title type="text"> </title>
          <updated>2008-07-23T14:21:06.407Z</updated>
          <author></author>
          <id>http://api.constantcontact.com/ws/customers/YOUR USERNAME/contacts/new</id>
          <summary type="text">Contact</summary>
          <content type="application/vnd.ctct+xml">
            <Contact xmlns="http://ws.constantcontact.com/ns/1.0/">
              <EmailAddress></EmailAddress>
              <EmailType></EmailType>
              <FirstName></FirstName>
              <LastName></LastName>
              <Status></Status>
              <ContactLists></ContactLists>
            </Contact>
          </content>
        </entry>'));
    local('output' = map('xml'=#entry, 'id'='http://api.constantcontact.com/ws/customers/YOUR USERNAME/contacts/new', 'lists'=array));
    return(@#output);
  /define_tag;

  // cc_deletecontact(map)
  // expects the output of cc_getcontact as input
  // deletes the data from the server
  define_tag('cc_deletecontact', -required='input');
    fail_if(!#input->isa('map'), -1, 'Input not a map');
    fail_if(#input !>> 'id', -1, 'Input does not contain ID');
    local('path' = #input->find('id'));
    local('entry' = #input->find('xml'));
    iterate(#entry->extract('//*[local-name()="Contact"]/*'),local('temp'));
      if(#temp->name == 'contactlists');
        loop(-from=#temp->children->size, -to=1, -by=-1);
          #temp->removechild(#temp->children->get(loop_count));
        /loop;
      else(#input >> #temp->name && #input->find(#temp->name) != #temp->contents);
        loop(-from=#temp->children->size, -to=1, -by=-1);
          #temp->removechild(#temp->children->get(loop_count));
        /loop;
        #temp->addcontent(#input->find(#temp->name));
      /if;
    /iterate;
    if(#input->find('id') == 'new');
      // Don't bother
    else;
      // DELETE
      cc_include(#path, -method='DELETE');
    /if;
  /define_tag;

  // cc_putcontact(map)
  // expects the output of cc_getcontact (or cc_newcontact) as input
  // updates the embedded xml and puts (or posts) the data on the server
  define_tag('cc_putcontact', -required='input');
    fail_if(!#input->isa('map'), -1, 'Input not a map');
    fail_if(#input !>> 'id', -1, 'Input does not contain ID');
    fail_if(#input !>> 'xml', -1, 'Input does not contain entry');
    local('entry' = #input->find('xml'));
    local('path' = #input->find('id'));
    if(#entry->extractone('//*[local-name()="OptInSource"]') == null);
      #entry->extractone('//*[local-name()="Contact"]')->addchild(xml('<OptInSource />'));
    /if;
    iterate(#entry->extract('//*[local-name()="Contact"]/*'),local('temp'));
      #temp->name == 'contactlists' ? loop_continue;
      if(#input >> #temp->name && #input->find(#temp->name) != #temp->contents);
        loop(-from=#temp->children->size, -to=1, -by=-1);
          #temp->removechild(#temp->children->get(loop_count));
        /loop;
        #temp->addcontent(#input->find(#temp->name));
      /if;
    /iterate;
    local('need' = array->insertfrom(#input->find('lists')->iterator)&);
    iterate(#entry->extract('//*[local-name()="ContactList"]'), local('temp'));
      local('id' = #temp->getattribute('id'));
      if(#need !>> #id);
        #entry->removechild(#temp);
      /if;
      #need->removeall(#id);
    /iterate;
    local('cc_lists' = cc_findlists());
    if(#entry->extractone('//*[local-name()="ContactLists"]') == null);
      #entry->extractone('//*[local-name()="Contact"]')->addchild(xml('<ContactLists />'));
    /if;
    iterate(#need, local('temp'));
      if(#cc_lists >> #temp);
        #entry->extractone('//*[local-name()="ContactLists"]')->addchild(xml(#cc_lists->find(#temp)->find('template')));
      /if;
    /iterate;
    if(#input->find('id')->endswith('/new'));
      // POST
      #path->replace('/new','');
      cc_include(#path, -method='POST', -params=string(#entry));
    else;
      // PUT
      cc_include(#path, -method='PUT', -params=string(#entry));
    /if;
  /define_tag;

  // cc_getlist('3')
  // The ID can be a list number 3 or the ID attribute of a ContactList record
  // Or the names of the special lists do_not_contact, active, bounced, removed
  // cc_getlist(cc_findlists()->last->getattribute('id'));
  define_tag('cc_getlist', -required='id');
    if(#id->beginswith('http'));
      local('path' = #id);
    else;
      local('path' = '/lists/' + #id);
    /if;
    local('cc_xml' = cc_include(#path, -params=params));
    return(#cc_xml->extractone('//*[local-name()="entry"]'));
  /define_tag;

  // cc_getlistmembers('3')
  // The ID can be a list number 3 or the ID attribute of a ContactList record
  // Or the names of the special lists do_not_contact, active, bounced, removed
  // cc_getlistmembers(cc_findlists()->last->extract('//*[local-name()="Members"]')->getattribute('id'));
  define_tag('cc_getlistmembers', -required='id');
    if(#id->beginswith('http'));
      local('path' = #id);
    else;
      local('path' = '/lists/' + #id + '/members');
    /if;
    local('cc_xml' = cc_include(#path, -params=params));
    return(#cc_xml->extractone('//*[local-name()="ContactList"]'));
  /define_tag;

?>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Constant Contact API

fletcher sandbeck-2
In reply to this post by Black Night Lists
On Sep 15, 2011, at 4:42 AM, Black Night Lists wrote:

> I have been working through creating an automated system which is to upload an updated email content on a daily basis to Constant Contact. However, I have hit a stumbling block as in order to update the content you need to use a PUT request (http://community.constantcontact.com/t5/Documentation/Updating-a-Campaign/ba-p/25045) and of course I realised that my planned method of using include_url is not going to work as it doesn't support it.

Oh, and this particular detail I found I had to handle using curl.

  shell('curl --silent --header "Content-Type: application/atom+xml" --user ' + #apikey + '%' + #username + ':' + #password + ' --request PUT --data "' + encode_sql(local('params')) + '" ' + #url);

[fletcher]

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Constant Contact API

Black Night Lists
Many thanks for your reply and thanks to Jason Huck for tweeting me to use curl also. I will give this a go today :)

On 15 Sep 2011, at 18:39, Fletcher Sandbeck wrote:

> Oh, and this particular detail I found I had to handle using curl.
>
>  shell('curl --silent --header "Content-Type: application/atom+xml" --user ' + #apikey + '%' + #username + ':' + #password + ' --request PUT --data "' + encode_sql(local('params')) + '" ' + #url);


Regards

Stephen Thirlwell
Black Night Software
LassoSoft Hosting Partner • Certified Lasso Developer
http://www.blacknight.co.uk







#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Constant Contact API

decorior
In reply to this post by fletcher sandbeck-2
It would be great to see include_url in lasso 9 support PUT and GET. I have run into this a couple of times and the lack of support for this seems to be a feature omission.

Deco
On Sep 15, 2011, at 11:39 AM, Fletcher Sandbeck wrote:

> On Sep 15, 2011, at 4:42 AM, Black Night Lists wrote:
>
>> I have been working through creating an automated system which is to upload an updated email content on a daily basis to Constant Contact. However, I have hit a stumbling block as in order to update the content you need to use a PUT request (http://community.constantcontact.com/t5/Documentation/Updating-a-Campaign/ba-p/25045) and of course I realised that my planned method of using include_url is not going to work as it doesn't support it.
>
> Oh, and this particular detail I found I had to handle using curl.
>
>  shell('curl --silent --header "Content-Type: application/atom+xml" --user ' + #apikey + '%' + #username + ':' + #password + ' --request PUT --data "' + encode_sql(local('params')) + '" ' + #url);
>
> [fletcher]
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Constant Contact API

Göran Törnquist-3
Start using the Curl type instead. It's marvelous, and it's the right
way to go if you're doing anything more complex than just requesting a page.

Since the include_url functionality builds on Curl, it seems a bit
pointless to duplicate what's already in the Curl type.

/Göran

On 2011-09-16 11.40, deco rior wrote:

> It would be great to see include_url in lasso 9 support PUT and GET. I have run into this a couple of times and the lack of support for this seems to be a feature omission.
>
> Deco
> On Sep 15, 2011, at 11:39 AM, Fletcher Sandbeck wrote:
>
>> On Sep 15, 2011, at 4:42 AM, Black Night Lists wrote:
>>
>>> I have been working through creating an automated system which is to upload an updated email content on a daily basis to Constant Contact. However, I have hit a stumbling block as in order to update the content you need to use a PUT request (http://community.constantcontact.com/t5/Documentation/Updating-a-Campaign/ba-p/25045) and of course I realised that my planned method of using include_url is not going to work as it doesn't support it.
>> Oh, and this particular detail I found I had to handle using curl.
>>
>>   shell('curl --silent --header "Content-Type: application/atom+xml" --user ' + #apikey + '%' + #username + ':' + #password + ' --request PUT --data "' + encode_sql(local('params')) + '" ' + #url);
>>
>> [fletcher]
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>>   the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to:<[hidden email]>
>> Send administrative queries to<[hidden email]>
> #############################################################
> This message is sent to you because you are subscribed to
>    the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to:<[hidden email]>
> Send administrative queries to<[hidden email]>
>


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Constant Contact API

Kevin Bice
Why have 'include_url' at all?

Because Lasso was created as a scripting language that more non-progammer web developers could embrace and use. It was less daunting. Seems that we are drifting away from that.

I am somewhere in between a full blown programmer and a good old web developer, and I went down the Lasso path originally because of its powerful features that could be used without much more than reading the language guide to see how to implement it. I agree that we should keep stretching the envelope and try to learn more for ourselves and add more power to Lasso, but new users of Lasso are more likely to come from simple web developers. Not people that already know PHP or Python.

I still use 8.5, and my new server has 8.6. The ongoing issues with 9 keep me from making that leap. I look forward to doing it once I feel it will not require a complete redo of everything else I have already done and I can install it without needing a 50+ email thread on the support list.
.................................
Kevin Bice
512-879-1653
http://fmpweb.com
.................................
Web Development and Design



On Sep 16, 2011, at 9:36 AM, Göran Törnquist wrote:

> Start using the Curl type instead. It's marvelous, and it's the right way to go if you're doing anything more complex than just requesting a page.
>
> Since the include_url functionality builds on Curl, it seems a bit pointless to duplicate what's already in the Curl type.
>
> /Göran
>
> On 2011-09-16 11.40, deco rior wrote:
>> It would be great to see include_url in lasso 9 support PUT and GET. I have run into this a couple of times and the lack of support for this seems to be a feature omission.
>>
>> Deco
>> On Sep 15, 2011, at 11:39 AM, Fletcher Sandbeck wrote:
>>
>>> On Sep 15, 2011, at 4:42 AM, Black Night Lists wrote:
>>>
>>>> I have been working through creating an automated system which is to upload an updated email content on a daily basis to Constant Contact. However, I have hit a stumbling block as in order to update the content you need to use a PUT request (http://community.constantcontact.com/t5/Documentation/Updating-a-Campaign/ba-p/25045) and of course I realised that my planned method of using include_url is not going to work as it doesn't support it.
>>> Oh, and this particular detail I found I had to handle using curl.
>>>
>>>  shell('curl --silent --header "Content-Type: application/atom+xml" --user ' + #apikey + '%' + #username + ':' + #password + ' --request PUT --data "' + encode_sql(local('params')) + '" ' + #url);
>>>
>>> [fletcher]
>>>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>>  the mailing list Lasso
>>> [hidden email]
>>> To unsubscribe, E-mail to:<[hidden email]>
>>> Send administrative queries to<[hidden email]>
>> #############################################################
>> This message is sent to you because you are subscribed to
>>   the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to:<[hidden email]>
>> Send administrative queries to<[hidden email]>
>>
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
> #############################################################
> This message is sent to you because you are subscribed to
> the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Constant Contact API

Göran Törnquist-3
The point is that they serve different purposes. Include_URL was
included in the feature set when most people wanted to make a http GET
to include some results from another service. Of course, you can put
more and more, and even more features into the same concept, but the
simple thing is that the Curl type - which I understand you have no
experience using - actually replaces the Include_URL with something that
is not only extremely well documented from source, CLI utility, and also
the Lasso documentation.

You don't need to replace anything when using Include_URL to get the
functionality in Lasso 9. It's just about the same.

The Curl type in Lasso 9 avoids the need add complexity by calling an
external script or command. It is by any way of measuring easier as a
solution, but with (almost) complete support for the very large Curl API.

/Göran

On 2011-09-16 16.57, Kevin Bice wrote:

> Why have 'include_url' at all?
>
> Because Lasso was created as a scripting language that more non-progammer web developers could embrace and use. It was less daunting. Seems that we are drifting away from that.
>
> I am somewhere in between a full blown programmer and a good old web developer, and I went down the Lasso path originally because of its powerful features that could be used without much more than reading the language guide to see how to implement it. I agree that we should keep stretching the envelope and try to learn more for ourselves and add more power to Lasso, but new users of Lasso are more likely to come from simple web developers. Not people that already know PHP or Python.
>
> I still use 8.5, and my new server has 8.6. The ongoing issues with 9 keep me from making that leap. I look forward to doing it once I feel it will not require a complete redo of everything else I have already done and I can install it without needing a 50+ email thread on the support list.
> .................................
> Kevin Bice
> 512-879-1653
> http://fmpweb.com
> .................................
> Web Development and Design
>
>
>
> On Sep 16, 2011, at 9:36 AM, Göran Törnquist wrote:
>
>> Start using the Curl type instead. It's marvelous, and it's the right way to go if you're doing anything more complex than just requesting a page.
>>
>> Since the include_url functionality builds on Curl, it seems a bit pointless to duplicate what's already in the Curl type.
>>
>> /Göran
>>
>> On 2011-09-16 11.40, deco rior wrote:
>>> It would be great to see include_url in lasso 9 support PUT and GET. I have run into this a couple of times and the lack of support for this seems to be a feature omission.
>>>
>>> Deco
>>> On Sep 15, 2011, at 11:39 AM, Fletcher Sandbeck wrote:
>>>
>>>> On Sep 15, 2011, at 4:42 AM, Black Night Lists wrote:
>>>>
>>>>> I have been working through creating an automated system which is to upload an updated email content on a daily basis to Constant Contact. However, I have hit a stumbling block as in order to update the content you need to use a PUT request (http://community.constantcontact.com/t5/Documentation/Updating-a-Campaign/ba-p/25045) and of course I realised that my planned method of using include_url is not going to work as it doesn't support it.
>>>> Oh, and this particular detail I found I had to handle using curl.
>>>>
>>>>   shell('curl --silent --header "Content-Type: application/atom+xml" --user ' + #apikey + '%' + #username + ':' + #password + ' --request PUT --data "' + encode_sql(local('params')) + '" ' + #url);
>>>>
>>>> [fletcher]
>>>>
>>>> #############################################################
>>>> This message is sent to you because you are subscribed to
>>>>   the mailing list Lasso
>>>> [hidden email]
>>>> To unsubscribe, E-mail to:<[hidden email]>
>>>> Send administrative queries to<[hidden email]>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>>    the mailing list Lasso
>>> [hidden email]
>>> To unsubscribe, E-mail to:<[hidden email]>
>>> Send administrative queries to<[hidden email]>
>>>
>>
>> --
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to:<[hidden email]>
>> Send administrative queries to<[hidden email]>
> #############################################################
> This message is sent to you because you are subscribed to
>    the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to:<[hidden email]>
> Send administrative queries to<[hidden email]>
>


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Constant Contact API

Jonathan Guthrie-3
In reply to this post by Kevin Bice
OK, seriously, include_url is not going away, and even Goran was not suggesting it was or should be.
He was suggesting that for power users that need more than include_url offers that the access to the underlying methods are there in the form of the direct CURL methods.

"Lasso was created as a scripting language that more non-progammer web developers could embrace and use"
- True, and the syntax has not changed, just opened up wider.



On 2011-09-16, at 10:57 AM, Kevin Bice wrote:

> Why have 'include_url' at all?
>
> Because Lasso was created as a scripting language that more non-progammer web developers could embrace and use. It was less daunting. Seems that we are drifting away from that.

Jono

----------------------------
Jonathan Guthrie
[hidden email]
LassoSoft Inc.

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Constant Contact API

Jonathan Guthrie-3
In reply to this post by Göran Törnquist-3
Hehe, and Göran should know, he wrote a lot of the CURL docs :)

http://www.lassosoft.com/lassoDocs/languageReference/obj/curl
Note his name on the side - I just edited and added where appropriate...

On 2011-09-16, at 11:05 AM, Göran Törnquist wrote:

> The point is that they serve different purposes. Include_URL was included in the feature set when most people wanted to make a http GET to include some results from another service. Of course, you can put more and more, and even more features into the same concept, but the simple thing is that the Curl type - which I understand you have no experience using - actually replaces the Include_URL with something that is not only extremely well documented from source, CLI utility, and also the Lasso documentation.
>
> You don't need to replace anything when using Include_URL to get the functionality in Lasso 9. It's just about the same.
>
> The Curl type in Lasso 9 avoids the need add complexity by calling an external script or command. It is by any way of measuring easier as a solution, but with (almost) complete support for the very large Curl API.
>
> /Göran
>


Jono

----------------------------
Jonathan Guthrie
[hidden email]
LassoSoft Inc.

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Constant Contact API

Göran Törnquist-3
Actually, the easiest way of using the Curl type is just to use it the
same way as a basic Include_URL...say what? :)

curl('http://www.lassosoft.com/')

to compare with

include_url('http://www.lassosoft.com/')

/Göran

On 2011-09-16 17.10, Jonathan Guthrie wrote:

> Hehe, and Göran should know, he wrote a lot of the CURL docs :)
>
> http://www.lassosoft.com/lassoDocs/languageReference/obj/curl
> Note his name on the side - I just edited and added where appropriate...
>
> On 2011-09-16, at 11:05 AM, Göran Törnquist wrote:
>
>> The point is that they serve different purposes. Include_URL was included in the feature set when most people wanted to make a http GET to include some results from another service. Of course, you can put more and more, and even more features into the same concept, but the simple thing is that the Curl type - which I understand you have no experience using - actually replaces the Include_URL with something that is not only extremely well documented from source, CLI utility, and also the Lasso documentation.
>>
>> You don't need to replace anything when using Include_URL to get the functionality in Lasso 9. It's just about the same.
>>
>> The Curl type in Lasso 9 avoids the need add complexity by calling an external script or command. It is by any way of measuring easier as a solution, but with (almost) complete support for the very large Curl API.
>>
>> /Göran
>>
>
> Jono
>
> ----------------------------
> Jonathan Guthrie
> [hidden email]
> LassoSoft Inc.
>
> #############################################################
> This message is sent to you because you are subscribed to
>    the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to:<[hidden email]>
> Send administrative queries to<[hidden email]>
>


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Constant Contact API

decorior
In reply to this post by Göran Törnquist-3
Perhaps this all just comes down to documentation.

I happily was using include_url, even though I knew it had curl below it. It was well documented with examples, etc.

And then one day I ran into PUT. So how should I handle that in lasso? Not much documentation out there, but a few references to shell.

So then I am reading up on curl with its million options, (all very cool, but I need to get code done for my boss). And now I have to start using shell ( with the required answers for my boss about security executing unix commands, etc.)

In the end I made it work. Sadly, there was a lot more out there on how to call PUT using PHP and Rails, etc.

Lasso is an awesome product that will probably never win the numbers game against Rails and PHP (since it costs more). But it will have a robust paying cliental by doing the things that make it unique. One of these was wrapping gobs of funky techie talk inside nice tags :-)

Not a big deal I guess.

I was asked why I used Lasso the other day versus open source. I give the reasons free seldom equals great

Deco


On Sep 16, 2011, at 9:05 AM, Göran Törnquist wrote:

> The point is that they serve different purposes. Include_URL was included in the feature set when most people wanted to make a http GET to include some results from another service. Of course, you can put more and more, and even more features into the same concept, but the simple thing is that the Curl type - which I understand you have no experience using - actually replaces the Include_URL with something that is not only extremely well documented from source, CLI utility, and also the Lasso documentation.
>
> You don't need to replace anything when using Include_URL to get the functionality in Lasso 9. It's just about the same.
>
> The Curl type in Lasso 9 avoids the need add complexity by calling an external script or command. It is by any way of measuring easier as a solution, but with (almost) complete support for the very large Curl API.
>
> /Göran
>
> On 2011-09-16 16.57, Kevin Bice wrote:
>> Why have 'include_url' at all?
>>
>> Because Lasso was created as a scripting language that more non-progammer web developers could embrace and use. It was less daunting. Seems that we are drifting away from that.
>>
>> I am somewhere in between a full blown programmer and a good old web developer, and I went down the Lasso path originally because of its powerful features that could be used without much more than reading the language guide to see how to implement it. I agree that we should keep stretching the envelope and try to learn more for ourselves and add more power to Lasso, but new users of Lasso are more likely to come from simple web developers. Not people that already know PHP or Python.
>>
>> I still use 8.5, and my new server has 8.6. The ongoing issues with 9 keep me from making that leap. I look forward to doing it once I feel it will not require a complete redo of everything else I have already done and I can install it without needing a 50+ email thread on the support list.
>> .................................
>> Kevin Bice
>> 512-879-1653
>> http://fmpweb.com
>> .................................
>> Web Development and Design
>>
>>
>>
>> On Sep 16, 2011, at 9:36 AM, Göran Törnquist wrote:
>>
>>> Start using the Curl type instead. It's marvelous, and it's the right way to go if you're doing anything more complex than just requesting a page.
>>>
>>> Since the include_url functionality builds on Curl, it seems a bit pointless to duplicate what's already in the Curl type.
>>>
>>> /Göran
>>>
>>> On 2011-09-16 11.40, deco rior wrote:
>>>> It would be great to see include_url in lasso 9 support PUT and GET. I have run into this a couple of times and the lack of support for this seems to be a feature omission.
>>>>
>>>> Deco
>>>> On Sep 15, 2011, at 11:39 AM, Fletcher Sandbeck wrote:
>>>>
>>>>> On Sep 15, 2011, at 4:42 AM, Black Night Lists wrote:
>>>>>
>>>>>> I have been working through creating an automated system which is to upload an updated email content on a daily basis to Constant Contact. However, I have hit a stumbling block as in order to update the content you need to use a PUT request (http://community.constantcontact.com/t5/Documentation/Updating-a-Campaign/ba-p/25045) and of course I realised that my planned method of using include_url is not going to work as it doesn't support it.
>>>>> Oh, and this particular detail I found I had to handle using curl.
>>>>>
>>>>>  shell('curl --silent --header "Content-Type: application/atom+xml" --user ' + #apikey + '%' + #username + ':' + #password + ' --request PUT --data "' + encode_sql(local('params')) + '" ' + #url);
>>>>>
>>>>> [fletcher]
>>>>>
>>>>> #############################################################
>>>>> This message is sent to you because you are subscribed to
>>>>>  the mailing list Lasso
>>>>> [hidden email]
>>>>> To unsubscribe, E-mail to:<[hidden email]>
>>>>> Send administrative queries to<[hidden email]>
>>>> #############################################################
>>>> This message is sent to you because you are subscribed to
>>>>   the mailing list Lasso
>>>> [hidden email]
>>>> To unsubscribe, E-mail to:<[hidden email]>
>>>> Send administrative queries to<[hidden email]>
>>>>
>>>
>>> --
>>> This message has been scanned for viruses and
>>> dangerous content by MailScanner, and is
>>> believed to be clean.
>>>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso
>>> [hidden email]
>>> To unsubscribe, E-mail to:<[hidden email]>
>>> Send administrative queries to<[hidden email]>
>> #############################################################
>> This message is sent to you because you are subscribed to
>>   the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to:<[hidden email]>
>> Send administrative queries to<[hidden email]>
>>
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
> #############################################################
> This message is sent to you because you are subscribed to
> the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Constant Contact API

Kevin Bice
In reply to this post by Göran Törnquist-3
Foot in mouth - common problem for some of us.

It is clear that I need to get on the 9 horse. Your points are well taken. While it is slightly more complex, it obviously has a lot to offer moving forward. Steffan's emails of late about install issues still give me pause, but I need to find out for myself.

Thanks for not flaming me.  :-)
.................................
Kevin Bice
512-879-1653
http://fmpweb.com
.................................
Web Development and Design



On Sep 16, 2011, at 10:05 AM, Göran Törnquist wrote:

> The point is that they serve different purposes. Include_URL was included in the feature set when most people wanted to make a http GET to include some results from another service. Of course, you can put more and more, and even more features into the same concept, but the simple thing is that the Curl type - which I understand you have no experience using - actually replaces the Include_URL with something that is not only extremely well documented from source, CLI utility, and also the Lasso documentation.
>
> You don't need to replace anything when using Include_URL to get the functionality in Lasso 9. It's just about the same.
>
> The Curl type in Lasso 9 avoids the need add complexity by calling an external script or command. It is by any way of measuring easier as a solution, but with (almost) complete support for the very large Curl API.
>
> /Göran
>
> On 2011-09-16 16.57, Kevin Bice wrote:
>> Why have 'include_url' at all?
>>
>> Because Lasso was created as a scripting language that more non-progammer web developers could embrace and use. It was less daunting. Seems that we are drifting away from that.
>>
>> I am somewhere in between a full blown programmer and a good old web developer, and I went down the Lasso path originally because of its powerful features that could be used without much more than reading the language guide to see how to implement it. I agree that we should keep stretching the envelope and try to learn more for ourselves and add more power to Lasso, but new users of Lasso are more likely to come from simple web developers. Not people that already know PHP or Python.
>>
>> I still use 8.5, and my new server has 8.6. The ongoing issues with 9 keep me from making that leap. I look forward to doing it once I feel it will not require a complete redo of everything else I have already done and I can install it without needing a 50+ email thread on the support list.
>> .................................
>> Kevin Bice
>> 512-879-1653
>> http://fmpweb.com
>> .................................
>> Web Development and Design
>>
>>
>>
>> On Sep 16, 2011, at 9:36 AM, Göran Törnquist wrote:
>>
>>> Start using the Curl type instead. It's marvelous, and it's the right way to go if you're doing anything more complex than just requesting a page.
>>>
>>> Since the include_url functionality builds on Curl, it seems a bit pointless to duplicate what's already in the Curl type.
>>>
>>> /Göran
>>>
>>> On 2011-09-16 11.40, deco rior wrote:
>>>> It would be great to see include_url in lasso 9 support PUT and GET. I have run into this a couple of times and the lack of support for this seems to be a feature omission.
>>>>
>>>> Deco
>>>> On Sep 15, 2011, at 11:39 AM, Fletcher Sandbeck wrote:
>>>>
>>>>> On Sep 15, 2011, at 4:42 AM, Black Night Lists wrote:
>>>>>
>>>>>> I have been working through creating an automated system which is to upload an updated email content on a daily basis to Constant Contact. However, I have hit a stumbling block as in order to update the content you need to use a PUT request (http://community.constantcontact.com/t5/Documentation/Updating-a-Campaign/ba-p/25045) and of course I realised that my planned method of using include_url is not going to work as it doesn't support it.
>>>>> Oh, and this particular detail I found I had to handle using curl.
>>>>>
>>>>>  shell('curl --silent --header "Content-Type: application/atom+xml" --user ' + #apikey + '%' + #username + ':' + #password + ' --request PUT --data "' + encode_sql(local('params')) + '" ' + #url);
>>>>>
>>>>> [fletcher]
>>>>>
>>>>> #############################################################
>>>>> This message is sent to you because you are subscribed to
>>>>>  the mailing list Lasso
>>>>> [hidden email]
>>>>> To unsubscribe, E-mail to:<[hidden email]>
>>>>> Send administrative queries to<[hidden email]>
>>>> #############################################################
>>>> This message is sent to you because you are subscribed to
>>>>   the mailing list Lasso
>>>> [hidden email]
>>>> To unsubscribe, E-mail to:<[hidden email]>
>>>> Send administrative queries to<[hidden email]>
>>>>
>>>
>>> --
>>> This message has been scanned for viruses and
>>> dangerous content by MailScanner, and is
>>> believed to be clean.
>>>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso
>>> [hidden email]
>>> To unsubscribe, E-mail to:<[hidden email]>
>>> Send administrative queries to<[hidden email]>
>> #############################################################
>> This message is sent to you because you are subscribed to
>>   the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to:<[hidden email]>
>> Send administrative queries to<[hidden email]>
>>
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
> #############################################################
> This message is sent to you because you are subscribed to
> the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Constant Contact API

Göran Törnquist-3
I wouldn't flame anyone. Haven't done in 17 years, won't do it now. It's
not fruitful. :)

I'd say check out Lasso 9. It might be that your mileage may be
different than others on this list. If positive, return some love to the
list. If not, ask for improvement.

/Göran

On 2011-09-16 17.38, Kevin Bice wrote:

> Foot in mouth - common problem for some of us.
>
> It is clear that I need to get on the 9 horse. Your points are well taken. While it is slightly more complex, it obviously has a lot to offer moving forward. Steffan's emails of late about install issues still give me pause, but I need to find out for myself.
>
> Thanks for not flaming me.  :-)
> .................................
> Kevin Bice
> 512-879-1653
> http://fmpweb.com
> .................................
> Web Development and Design
>
>
>
> On Sep 16, 2011, at 10:05 AM, Göran Törnquist wrote:
>
>> The point is that they serve different purposes. Include_URL was included in the feature set when most people wanted to make a http GET to include some results from another service. Of course, you can put more and more, and even more features into the same concept, but the simple thing is that the Curl type - which I understand you have no experience using - actually replaces the Include_URL with something that is not only extremely well documented from source, CLI utility, and also the Lasso documentation.
>>
>> You don't need to replace anything when using Include_URL to get the functionality in Lasso 9. It's just about the same.
>>
>> The Curl type in Lasso 9 avoids the need add complexity by calling an external script or command. It is by any way of measuring easier as a solution, but with (almost) complete support for the very large Curl API.
>>
>> /Göran
>>
>> On 2011-09-16 16.57, Kevin Bice wrote:
>>> Why have 'include_url' at all?
>>>
>>> Because Lasso was created as a scripting language that more non-progammer web developers could embrace and use. It was less daunting. Seems that we are drifting away from that.
>>>
>>> I am somewhere in between a full blown programmer and a good old web developer, and I went down the Lasso path originally because of its powerful features that could be used without much more than reading the language guide to see how to implement it. I agree that we should keep stretching the envelope and try to learn more for ourselves and add more power to Lasso, but new users of Lasso are more likely to come from simple web developers. Not people that already know PHP or Python.
>>>
>>> I still use 8.5, and my new server has 8.6. The ongoing issues with 9 keep me from making that leap. I look forward to doing it once I feel it will not require a complete redo of everything else I have already done and I can install it without needing a 50+ email thread on the support list.
>>> .................................
>>> Kevin Bice
>>> 512-879-1653
>>> http://fmpweb.com
>>> .................................
>>> Web Development and Design
>>>
>>>
>>>
>>> On Sep 16, 2011, at 9:36 AM, Göran Törnquist wrote:
>>>
>>>> Start using the Curl type instead. It's marvelous, and it's the right way to go if you're doing anything more complex than just requesting a page.
>>>>
>>>> Since the include_url functionality builds on Curl, it seems a bit pointless to duplicate what's already in the Curl type.
>>>>
>>>> /Göran
>>>>
>>>> On 2011-09-16 11.40, deco rior wrote:
>>>>> It would be great to see include_url in lasso 9 support PUT and GET. I have run into this a couple of times and the lack of support for this seems to be a feature omission.
>>>>>
>>>>> Deco
>>>>> On Sep 15, 2011, at 11:39 AM, Fletcher Sandbeck wrote:
>>>>>
>>>>>> On Sep 15, 2011, at 4:42 AM, Black Night Lists wrote:
>>>>>>
>>>>>>> I have been working through creating an automated system which is to upload an updated email content on a daily basis to Constant Contact. However, I have hit a stumbling block as in order to update the content you need to use a PUT request (http://community.constantcontact.com/t5/Documentation/Updating-a-Campaign/ba-p/25045) and of course I realised that my planned method of using include_url is not going to work as it doesn't support it.
>>>>>> Oh, and this particular detail I found I had to handle using curl.
>>>>>>
>>>>>>   shell('curl --silent --header "Content-Type: application/atom+xml" --user ' + #apikey + '%' + #username + ':' + #password + ' --request PUT --data "' + encode_sql(local('params')) + '" ' + #url);
>>>>>>
>>>>>> [fletcher]
>>>>>>
>>>>>> #############################################################
>>>>>> This message is sent to you because you are subscribed to
>>>>>>   the mailing list Lasso
>>>>>> [hidden email]
>>>>>> To unsubscribe, E-mail to:<[hidden email]>
>>>>>> Send administrative queries to<[hidden email]>
>>>>> #############################################################
>>>>> This message is sent to you because you are subscribed to
>>>>>    the mailing list Lasso
>>>>> [hidden email]
>>>>> To unsubscribe, E-mail to:<[hidden email]>
>>>>> Send administrative queries to<[hidden email]>
>>>>>
>>>> --
>>>> This message has been scanned for viruses and
>>>> dangerous content by MailScanner, and is
>>>> believed to be clean.
>>>>
>>>> #############################################################
>>>> This message is sent to you because you are subscribed to
>>>> the mailing list Lasso
>>>> [hidden email]
>>>> To unsubscribe, E-mail to:<[hidden email]>
>>>> Send administrative queries to<[hidden email]>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>>    the mailing list Lasso
>>> [hidden email]
>>> To unsubscribe, E-mail to:<[hidden email]>
>>> Send administrative queries to<[hidden email]>
>>>
>>
>> --
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to:<[hidden email]>
>> Send administrative queries to<[hidden email]>
> #############################################################
> This message is sent to you because you are subscribed to
>    the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to:<[hidden email]>
> Send administrative queries to<[hidden email]>
>


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Constant Contact API

Jonathan Guthrie-3
In reply to this post by Kevin Bice
On 2011-09-16, at 11:38 AM, Kevin Bice wrote:

> It is clear that I need to get on the 9 horse. Your points are well taken. While it is slightly more complex, it obviously has a lot to offer moving forward. Steffan's emails of late about install issues still give me pause, but I need to find out for myself.

While Steffan's install issues are not the only one's we've seen (and we freely admit that), there have been plenty that have gone smoothly, the sad thing is often we only get to see the rocky ones on the lists, but I hear about the smooth ones frequently :)

> Thanks for not flaming me.  :-)

Actually considering this list is unmoderated, I am constantly amazed at how civil this list is (compared to some others) - I hope it stays that way!

As far as moving towards Lasso 9, I suggest the easiest way would be to crank up a VM, either on a server or on your local machine with Parallels, VMWare Fusion or whatever, and try it there. You have the opportunity to install and try your codebase in Lasso 9 without interrupting either your desktop or any of your servers, and the dev install & license is free.

Thanks!

Jono

----------------------------
Jonathan Guthrie
[hidden email]
LassoSoft Inc.

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Constant Contact API

Jolle Carlestam-3

16 sep 2011 kl. 17.58 skrev Jonathan Guthrie:

>> Thanks for not flaming me.  :-)
>
> Actually considering this list is unmoderated, I am constantly amazed at how civil this list is (compared to some others) - I hope it stays that way!

What do you mean with civil? I am not civil! You can take your civil ### and stuff it up your civil %%%!
Come here calling us civil... Mongrel...
Pfhst, Kiwi -> Canuck wannabe :-(



Thanks, Jono for allowing that out of my system. Now I can go on coding and politely sharing code and tips for the next 20 years.

> As far as moving towards Lasso 9, I suggest the easiest way would be to crank up a VM, either on a server or on your local machine with Parallels, VMWare Fusion or whatever, and try it there. You have the opportunity to install and try your codebase in Lasso 9 without interrupting either your desktop or any of your servers, and the dev install & license is free.

I can only but recommend taking a good look at Lasso 9. It is not at all as daunting as it sometimes can appear on this list and the rewards are abundant.
Today I've been forced to do some legacy coding in 8.5 and I just can't wait to get back in the smooth haven of Lasso 9. It is so much more fun!
Come join us!

HDB
Jolle
#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>