why your own SOAP?

sime - April 17, 2009 - 01:44
Project:Campaign Monitor
Version:6.x-3.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hi

I'm kind of surprised you're implementing soap calls yourself when Campaign monitor provide a drop-in class
http://code.google.com/p/campaignmonitor-php/source/browse/trunk/CMBase.php

They say it's php4 compatible too.

If you could implement this so it can be dropped in, then you would allow people to simply call API directly.

Here's an example of a call with custom fields, which is pretty simple.
http://code.google.com/p/campaignmonitor-php/source/browse/trunk/Subscri...
Purely speculating, but your module could simplify certain tasks by handling the instantiation of the CampaignMonitor object.

<?php
  $result
= campaignmonitor_callapi('subscriberAddWithCustomFields', 'joe@notarealdomain.com', 'Joe Smith', array('Dog' => 'Fido'));
  if(
$result['Code'] == 0)
    echo
'Success';
  }
  else {
    echo
'Error : ' . $result['Message'];
  }

?>

Either way - why do the SOAP yourself? Was there a problem with the code they provide at some point?

Cheers
.s

#1

ssherriff - June 11, 2009 - 05:50

When I first created the module that libary wasn't that far along, so I did it myself. From then on, it was just already done, and so I didn't need to add too many SOAP requests. I am looking into moving it over to that library now though.

I haven't had much time to work on this lately, but am trying to put some time aside to work on this soon.

#2

sime - June 11, 2009 - 06:08
Status:active» closed

Nice to hear. FWIW, looking at the new API it all looks pretty straight-forward.

 
 

Drupal is a registered trademark of Dries Buytaert.