PHP code example of webhubworks / craft-weclapp-api
1. Go to this page and download the library: Download webhubworks/craft-weclapp-api 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/ */
webhubworks / craft-weclapp-api example snippets
use Webhub\WeclappApiCraft\Plugin;
// Shared, configured core client
$client = Plugin::getInstance()->getClient();
// equivalent to:
$client = Plugin::getInstance()->api->getClient();
$count = $client->getArticleCount();
$articles = $client->getArticle();