PHP code example of openpublicmedia / pbs-station-manager-php
1. Go to this page and download the library: Download openpublicmedia/pbs-station-manager-php 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/ */
openpublicmedia / pbs-station-manager-php example snippets
use OpenPublicMedia\PbsStationManager\Client;
$api_key = 'xxxxxxxxxxxxxx';
$api_secret = 'xxxxxxxxxxx';
$client = new Client($api_key, $api_secret);
$station = $client->getStation('271a9ab7-e9ed-4fec-9fe9-e46c97a3f8f0');
var_dump($station);
class OpenPublicMedia\PbsStationManager\Entity\Station#40 (35) {
private $id => string(36) "271a9ab7-e9ed-4fec-9fe9-e46c97a3f8f0"
private $callSign => string(4) "KCTS"
private $fullCommonName => string(6) "KCTS 9"
private $shortCommonName => string(6) "KCTS 9"
private $tagLine => string(25) "Inspiring a Smarter World"
private $timezone => string(19) "America/Los_Angeles"
private $secondaryTimezone => NULL
private $passportEnabled => NULL
private $annualPassportQualifyingAmount => NULL
private $primaryChannel => string(4) "KCTS"
private $primetimeStart => string(3) "8PM"
private $tvssUrl => string(26) "https://kcts9.org/schedule"
private $donateUrl => string(116) "https://www.callswithoutwalls.com/pledgeCart3/?campaign=DF609D70-0D2E-4AE2-8F52-28B9EAE991E0&source=TV1AM-W1809--003"
private $kidsLiveStreamUrl => NULL
private $websiteUrl => string(18) "https://kcts9.org/"
private $facebookUrl => string(30) "https://www.facebook.com/KCTS9"
private $twitterUrl => string(25) "https://twitter.com/kcts9"
private $stationKidsUrl => NULL
private $passportUrl => string(116) "https://www.callswithoutwalls.com/pledgeCart3/?campaign=DF609D70-0D2E-4AE2-8F52-28B9EAE991E0&source=TV1AM-W1809--003"
private $videoPortalUrl => string(24) "https://video.kcts9.org/"
private $videoPortalBannerUrl => string(18) "https://kcts9.org/"
private $pdp => NULL
private $addressLine1 => string(17) "401 Mercer Street"
private $addressLine2 => NULL
private $city => string(7) "Seattle"
private $state => string(2) "WA"
private $zipCode => string(5) "98109"
private $countryCode => string(2) "US"
private $email => string(20) "[email protected]"
private $telephone => string(14) "(800) 937-5287"
private $fax => string(14) "(206) 443-6691"
private $images => array(3) {[...]}
private $pageTracking => string(12) "UA-2418330-1"
private $eventTracking => string(12) "UA-2418330-1"
private $updatedAt => class DateTime#34 (3) {...}
}
$stations = $client->getStations();
var_dump(count($stations));
int(156)