arcadier / arcadier-php
Arcadier's PHP SDK
Requires
- php: ^7.0.0
- vlucas/phpdotenv: ^5.2
README
This PHP SDK is an API wrapper that allows developers to integrate their PHP applications easily with Arcadier's APIs. It does the heavily lifting of building the requests and authentication for every API call
Requirements
- PHP 7.0.0+
- An Arcadier marketplace of package Scale or above (including Enterprise)
Getting Started
Download the required libraries to your directory using the following Composer command line:
composer require arcadier/arcadier-php
Find the .env
file in the following directory created: "vendor\arcadier\arcadier-php\src" and replace the variables with the relevant values:
CLIENT_ID = ""
CLIENT_SECRET = ""
DOMAIN = ""
PROTOCOL = ""
Remember to load the SDK by including the following line in all your PHP scripts:
require "vendor\arcadier\arcadier-php\src\api.php"; $sdk = new ApiSdk();
Trying it
In every PHP script in your root directory, make sure to include api.php
require "vendor\arcadier\arcadier-php\src\api.php"; $sdk = new ApiSdk();
Then you will be able to call Arcadier's APIs in your script.
Get your marketplace's information
Endpoint: GET /api/v2/marketplaces
$marketplace_info = $sdk->getMarketplaceInfo(); echo $marketplace_info;
Listing all items:
Endpoint: GET /api/v2/items
$item_list = $sdk->getAllItems(); echo $item_list['Records']; //The actual array of items is in the "Records" field of the JSON response
Documentation for the SDK
The full documentation for the SDK can be found here.
Documentation for APIs
View our full API collection on Postman here: API Documentation.
Changelog
Our changelog can be accessed here.