PHPackages                             openpublicmedia/pbs-tv-schedules-service-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. openpublicmedia/pbs-tv-schedules-service-php

ActiveLibrary[API Development](/categories/api)

openpublicmedia/pbs-tv-schedules-service-php
============================================

PHP client for consuming the PBS TV Schedules Service (TVSS) API.

v2.1.0(3y ago)02.4k↓66.7%1Apache-2.0PHPPHP ^8.0

Since Jul 12Pushed 3y ago1 watchersCompare

[ Source](https://github.com/OpenPublicMedia/pbs-tv-schedules-service-php)[ Packagist](https://packagist.org/packages/openpublicmedia/pbs-tv-schedules-service-php)[ RSS](/packages/openpublicmedia-pbs-tv-schedules-service-php/feed)WikiDiscussions main Synced 2mo ago

READMEChangelogDependencies (5)Versions (5)Used By (1)

PBS TV Schedules Service (TVSS) PHP Library
===========================================

[](#pbs-tv-schedules-service-tvss-php-library)

This library abstracts interactions with the [PBS TV Schedules Service API](https://docs.pbs.org/display/tvsapi).

Installation
------------

[](#installation)

Install via composer:

```
composer require openpublicmedia/pbs-tv-schedules-service-php
```

Use
---

[](#use)

The primary class provided by this library is the `OpenPublicMedia\PbsTvSchedulesService\Client`. A `Client` instance can be used to query the API's endpoints for schedule data.

### Examples

[](#examples)

#### Creating a client

[](#creating-a-client)

```
use OpenPublicMedia\PbsTvSchedulesService\Client;

$api_key = 'xxxxxxxxxxxxxx';
$call_sign = 'xxxx';

$client = new Client($api_key, $call_sign);
```

The `$api_key` and `$call_sign` parameters are optional, as not all endpoints require them.

#### Getting listings for a day.

[](#getting-listings-for-a-day)

```
$today = new DateTime();
$results = $client->getListings($today);
var_dump(reset($results));
class stdClass#45 (4) {
    public $cid => string(36) "6ecdcaa4-a42d-4360-88a0-90131287f9ef"
    public $external_id => string(6) "110268"
    public $short_name => string(7) "KCTSDT4"
    public $full_name => string(10) "KCTS World"
    public $timezone => string(19) "America/Los_Angeles"
    public $listings => array(20) { ... }
    public $analog_channel => string(1) "9"
    public $digital_channel => string(3) "9.4"
}
```

Listings are returned in and organized by *channel*. Each object in the array contains a `$listings` property with listings data.

#### Getting listings with images.

[](#getting-listings-with-images)

```
$today = new DateTime();
$results = $client->getListings($today, false, true);
var_dump($results[0]->listings[0]);
class stdClass#41 (25) {
    [...]
    public $images => array(19) {
        [0] => class stdClass#33 (8) {
          public $type => string(10) "image/jpeg"
          public $image => string(84) "https://image.pbs.org/gracenote/pbsd.tmsimg.com/assets/p7879062_n183662_cc_v9_aa.jpg"
          public $ratio => string(3) "3:4"
          public $width => string(4) "1080"
          public $height => string(4) "1440"
          public $caption => string(10) "Ray Suarez"
          public $updated_at => string(20) "2012-12-12T00:00:00Z"
          public $external_profile => string(17) "Cast in Character"
        }
        [1] => class stdClass#34 (8) {
          public $type => string(10) "image/jpeg"
          public $image => string(84) "https://image.pbs.org/gracenote/pbsd.tmsimg.com/assets/p7879062_n191589_cc_v9_ab.jpg"
          public $ratio => string(3) "3:4"
          public $width => string(4) "1080"
          public $height => string(4) "1440"
          public $caption => string(10) "Gwen Ifill"
          public $updated_at => string(20) "2013-09-04T21:02:00Z"
          public $external_profile => string(17) "Cast in Character"
        }
        [...]
    }
    [...]
}
```

#### Searching listings data.

[](#searching-listings-data)

```
$results = $client->search('jamestown');
var_dump($results);
class stdClass#31 (2) {
    public $program_results => array(2) { ... }
    public $show_results => array(5) { ... }
}
```

Search results are organized in `$program_results` and `$show_results`. Utility methods are provided to filter this results (`searchPrograms`, `searchShows`).

Development goals
-----------------

[](#development-goals)

See [CONTRIBUTING](CONTRIBUTING.md) for information about contributing to this project.

### v1

[](#v1)

- API authentication (`OpenPublicMedia\PbsTvSchedulesService\Client`)
- API direct querying (`$client->get()`)
- Result/error handling
- GET wrappers for endpoints (`$client->getXXX()`)
- Search endpoints support (`$client->search()`)

### v2

[](#v2)

- PHP 8 support

### v3.x

[](#v3x)

- Create entities for response data
    - Channel (???)
    - Listing
    - Image
- Swap "kids only" and "fetch images" parameters where appropriate

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~433 days

Total

4

Last Release

1195d ago

Major Versions

v1.0.1 → v2.0.02021-12-14

PHP version history (2 changes)v1.0.0PHP &gt;=7.1

v2.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/bff91dfe597545a4f54945ec9aee22330bf39fd981466accfa486ede2b573abc?d=identicon)[cdubz](/maintainers/cdubz)

---

Top Contributors

[![cdubz](https://avatars.githubusercontent.com/u/10456740?v=4)](https://github.com/cdubz "cdubz (19 commits)")

---

Tags

api-clientphp

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/openpublicmedia-pbs-tv-schedules-service-php/health.svg)

```
[![Health](https://phpackages.com/badges/openpublicmedia-pbs-tv-schedules-service-php/health.svg)](https://phpackages.com/packages/openpublicmedia-pbs-tv-schedules-service-php)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
