PHP code example of vanilo / cloud-sdk
1. Go to this page and download the library: Download vanilo/cloud-sdk library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vanilo / cloud-sdk example snippets
$api = VaniloCloud\ApiClient::for('https://your.v-shop.cloud')->withCredentials('client id', 'client secret');
$api = VaniloCloud\ApiClient::sandbox();
$api = VaniloCloud\ApiClient::for('https://your.v-shop.cloud')
->withCredentials('client id', 'client secret')
->useLaravelTokenStore();
$api = VaniloCloud\ApiClient::sandbox();
$api->rawGet('/taxonomies');
//=> Illuminate\Http\Client\Response {#2743
// +cookies: GuzzleHttp\Cookie\CookieJar {#2725},
// +transferStats: GuzzleHttp\TransferStats {#2765},
$response = $api->rawGet('/taxonomies');
foreach ($response->json('data') as $taxonomy) {
echo $taxonomy['name'];
}
// Category
$api = VaniloCloud\ApiClient::sandbox();
$taxonomy = $api->taxonomy(1);
// => VaniloCloud\Models\Taxonomy
// id: "1",
// name: "Category",
// slug: "category",
// created_at: "2022-12-06T16:23:34+00:00",
// updated_at: "2023-01-13T08:03:29+00:00"