PHP code example of chkltlabs / wix-client

1. Go to this page and download the library: Download chkltlabs/wix-client 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/ */

    

chkltlabs / wix-client example snippets


//members domain
$response = $api->members->get('v1/members', ['limit' => 100]);
$response = $api->members->listMembersV1Members([], ['limit' => 100]);

//ecom domain
$response = $api->ecom->post('v1/orders/query', ['query' => []]);
$response = $api->ecom->getOrder(['id' => $orderId]);

//site actions domain
$response = $api->site_actions->post('v1/site-actions', ['action' => []]);
$response = $api->site_actions->bulkDeleteSite([], ['siteIds' => [$siteId]]);

//src/Resources/Blog.php


namespace Chkltlabs\WixClient\Resources;

use Chkltlabs\WixClient\Traits\HasCachedResources;

class Blog extends AbstractResource
{
    use HasCachedResources;
}

//src/Resources/Blog/Posts.php


namespace Chkltlabs\WixClient\Resources\Blog;

use Chkltlabs\WixClient\Resources\AbstractResource;

class Posts extends AbstractResource
{
    public function list(array $params = []): object
    {
      //...
    }
  //...
}