PHP client for interacting with the PBS Station Manager API.

v1.0.0 2019-07-12 16:28 UTC

This package is auto-updated.

Last update: 2021-06-15 20:47:21 UTC


This library abstracts interactions with the PBS Station Manager API.


Install via composer:

composer require openpublicmedia/pbs-station-manager-php


The primary class provided by this library is the OpenPublicMedia\PbsStationManager\Client. A Client instance can be used to query the API in various ways. An API key and secret is optional, as the Station Manager API provides public and internal endpoints.

Response data structures

The API currently only support retrieving station information so Client provides two methods:

  • getStation($id)
  • getStations()

Both methods return OpenPublicMedia\PbsStationManager\Entity\Station instances. A single instance for the singular getter and an array of instances for the plural getter.


Creating a client

use OpenPublicMedia\PbsStationManager\Client;

$api_key = 'xxxxxxxxxxxxxx';
$api_secret = 'xxxxxxxxxxx';

$client = new Client($api_key, $api_secret);

Getting a single Station

$station = $client->getStation('271a9ab7-e9ed-4fec-9fe9-e46c97a3f8f0');
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) ""
  private $donateUrl => string(116) ""
  private $kidsLiveStreamUrl => NULL
  private $websiteUrl => string(18) ""
  private $facebookUrl => string(30) ""
  private $twitterUrl => string(25) ""
  private $stationKidsUrl => NULL
  private $passportUrl => string(116) ""
  private $videoPortalUrl => string(24) ""
  private $videoPortalBannerUrl => string(18) ""
  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 => int(98109)
  private $countryCode => string(2) "US"
  private $email => string(20) ""
  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) {...}

Getting all Stations

$stations = $client->getStations();

Development goals

See CONTRIBUTING for information about contributing to this project.


  • API authentication (OpenPublicMedia\PbsStationManager\Client)
  • API direct querying ($client->request())
  • Result/error handling
  • Station entity (OpenPublicMedia\PbsStationManager\Entity\Station)
  • Station getters.