packlink-dev / api-php-sdk

Packlink API PHP SDK
Other
8 stars 4 forks source link

initial version of the API #1

Closed nesh-younify closed 8 years ago

nesh-younify commented 8 years ago

@egulias first API version and basic tests

egulias commented 8 years ago

@nesh-younify is there possibility to use autoloading, external libs like Guzzle and other? (mostly regarding compatibilities with Magento1 or other "older" ecommerces (e.g Prestashop)) Thanks

nesh-younify commented 8 years ago

@egulias As this is low-level API I did not wanted to put any external dependency on it and resorted to using "raw" cURL calls for posting. If you think that using Guzzle may be a better idea it should not be too much work to rework Connection class to use it instead cURL.

As for autoloader -- ton's of different naming schemes and autoloaders in different shop software was the reason to stayed away from it, IMHO it's safer to pull (require) API inside of shop module code which in turn will use shop's autoloader scheme. Only possible problem I can see is that I'm using namespaces which in turn rules out PHP 5.2.

egulias commented 8 years ago

Ok on cURL, we can rework this later. Yeah, that's why (PHP 5.2) I was asking.

nesh-younify commented 8 years ago

@egulias yeah, 5.2 may be a problem. If some specific shop (still) requires 5.2 support (I'm not even 100% sure if rest of the code is 5.2 compatible) it may be best to branch it into specific case and rename/move around accordingly.