torreycommerce / acenda-php-sdk
Acenda PHP SDK
Installs: 14 597
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 17
Forks: 1
Open Issues: 0
Type:sdk
Requires
- php: >=7.0
- ext-curl: *
- ext-json: *
- nategood/httpful: ^1.0.0
- dev-master
- 1.0.14
- v1.0.13
- v1.0.12
- v1.0.11
- v1.0.10
- v1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- 0.4.1
- v0.4.0
- v0.3.9
- v0.3.8
- v0.3.7
- 0.3.6
- v0.3.5
- v0.3.4
- v0.3.3
- v0.3.2
- v0.3.1
- v0.3
- v0.2.2
- v0.2.1
- v0.2
- v0.1.5
- v0.1.4
- v0.1.3
- 0.1.2
- v0.1.1
- v0.1.0
- dev-feature_curl_progress_function
- dev-feature_low_level_exception_retry
- dev-feature_bearer_token_in_auth_header
- dev-feature_authorization_header
- dev-feature_send_bearer_token_as_header
- dev-feature_new_throttling
- dev-file_uploads
This package is auto-updated.
Last update: 2024-11-10 19:25:39 UTC
README
Acenda website: Acenda
Homepage: Git repository
Author: Acenda development Team
Description
The Acenda PHP Client makes it very easy to manage the authentication
and query to any store you would have access to.
Note:
- This client is in Alpha and doesn't have all the features needed *
Install
Composer
Installation through composer is the easiest.
Just add these lines to your file composer.json
:
{ "require": { "torreycommerce/acenda-php-sdk": "0.3.*" } }
How to use it
Usage should be simple enough for you to use it right away.
After instantiation, access all the API of your store:
<?php // Autoloading of your dependecies. include('vendors/autoload.php'); try { $acenda = new Acenda\Client( _CLIENT_ID_, _CLIENT_SECRET_, _STORE_NAME_); $acenda->get('/order', [ 'limit' => 1, 'attributes' => 'id' ]); /** ** Response example ** object(Acenda\Response)#16 (2) { ** ["code"]=> ** int(200) ** ["body"]=> ** object(stdClass)#14 (4) { ** ["code"]=> ** int(200) ** ["status"]=> ** string(2) "OK" ** ["num_total"]=> ** int(1) ** ["result"]=> ** array(1) { ** [0]=> ** object(stdClass)#15 (1) { ** ["id"]=> ** int(3398553) ** } ** } ** } ** } **/ }catch (Exception $e){ /* ** Two types of exceptions are thrown, ** AcendaException which are Acenda HTTP request related, ** And Exception which are usage and PHP related. */ var_dump($e); }
Examples:
File upload
$acenda->post('/import/upload', [
'model'=>'variant'
],['/tmp/tempfile.csv']);
Contributing
Acenda highly encourages sending in pull requests.
When submitting a pull request please:
- Make sure your code follows the coding conventions.
- Please use soft tabs (four spaces) instead of hard tabs.
- Make sure you add appropriate test coverage for your changes.
Support
Please report bugs on the issue manager of the project on GitHub. A forum will soon be open to answer questions.