PHP code example of schoolsfocus / sf-webcontents-api-client
1. Go to this page and download the library: Download schoolsfocus/sf-webcontents-api-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/ */
schoolsfocus / sf-webcontents-api-client example snippets
use SfWebcontentsApiClient\WebcontentsApiClient;
$client = new WebcontentsApiClient([
'api_url' => 'https://your-api-url.com/',
'api_key' => 'your-api-key'
]);
$content = $client->fetchContent([
'name' => 'example_content',
'limit' => 10
]);
$events = $client->fetchEvents([
'timeline' => 'upcoming',
'type' => 'event',
'limit' => 5
]);
$media = $client->fetchMediaGallery([
'mediaType' => 'images',
'limit' => 10
]);
$systemData = $client->fetchSystemData();
$menu = $client->fetchWebsiteMenu([
'menuLevel' => 'parent'
]);