Open CaptainYarb opened 12 years ago
Blazedd,
If you want to work with the raw XML or JSON data, then you only need to use the ChargifyConnector class and can ignore the rest. The rest are just convenience to avoid the raw output.
Let me know if this works for you, Jason
There is a lot of this API class that is forced to use XML (such as getting all subscriptions) which is kinda silly.
Why doesn't this class operate the same between 1 extended class rather than 8 different ones?
Example:
[MAIN CLASS] $chargify = new Chargify($APIKEY,$DOMAINKEY,$RESPONSE='JSON'); [BUILD REQUEST] $chargify->subscriptions->getAll(); [GET REQUEST] $chargify->getRequest(); // already in format
done
current format
[EXTERNAL CLASS $subscriptions = new ChargifySubscription(); OPENS MAIN CLASS] $this->connector = new ChargifyConnector($test_mode); // wut? [BUILD REQUEST $subscriptions->getAll($vars['page'],$vars['perpage']); SET RESPONSE TYPE] // why should each function define it?? This is a global setting!!! GRRRR [GET DATA] $customers = $subscriptions->getXML(); // seemingly unnecessary