Skip to content

JSON / XML not balanced #12

@CaptainYarb

Description

@CaptainYarb

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions