Download the PHP package openpublicmedia/pbs-media-manager-php without Composer
On this page you can find all versions of the php package openpublicmedia/pbs-media-manager-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download openpublicmedia/pbs-media-manager-php
More information about openpublicmedia/pbs-media-manager-php
Files in openpublicmedia/pbs-media-manager-php
Package pbs-media-manager-php
Short Description PHP client for consuming the PBS Media Manager API.
License Apache-2.0
Informations about the package pbs-media-manager-php
PBS Media Manager PHP Library
This library abstracts interactions with the PBS Media Manager API based on the Media Manager Core Data Model:
Installation
Install via composer:
Use
The primary class provided by this library is the
OpenPublicMedia\PbsMediaManager\Client
. A Client
instance can be used to
query the API in various ways based on the Core Data Model. The client requires
an API key and secret, provided by PBS.
Response data structures
Responses from the Client
class will return either a Generator in the case of
plural getters (e.g. getFranchises
, getShows
, getSeasons
, etc.) or an
object for singular getters (e.g. getEpisode
, getCollection
, etc.). Search
methods (e.g. searchShows
, searchEpisodes
, etc.) also return Generators.
In all cases, objects representing API data follow a standard structure with the following properties:
id
: guid for the object.type
: string of the object type (e.g. "franchise", "show", "season", etc.).links
: links to related API endpoints for the object.attributes
: metadata about the object.
Examples
Creating a client
Getting all Franchises
Getting a single Episode
Searching (Franchises, Shows, Specials, and Episodes)
Searching (Assets)
Assets have much more advanced search options that must be passed to the method directly as query parameters. The example below searches for all Assets beloning to a Show with "Mossback" in the Show title and both "Seattle" and "came" in the *Episode" title.
See Searching Assets for detailed documentation about available search filters.
Handling exceptions
Most plural Client
getters (e.g. Client::getShows
) can throw
OpenPublicMedia\PbsMediaManager\Exception\BadRequestException
. This exception
will include a JSON encoded message that can be used to determine follow-up
actions. Singular getters (e.g. Client::getShow
) will generally return null
for invalid IDs.
Development goals
See CONTRIBUTING for information about contributing to this project.
v1
- [x] API authentication (
OpenPublicMedia\PbsMediaManager\Client
) - [x] API direct querying (
$client->request()
) - [x] Result/error handling
- [x] GET wrappers for core data objects (
$client->getXXX()
) - [x] Transparent paged response handling (
OpenPublicMedia\PbsMediaManager\Response\PagesResponse
)
v1.x
- [x] POST support (
OpenPublicMedia\PbsMediaManager\Client::post
)- [x] Asset (
OpenPublicMedia\PbsMediaManager\Client::addAsset
) - [x] Episode (
OpenPublicMedia\PbsMediaManager\Client::addEpisode
) - [x] Special (
OpenPublicMedia\PbsMediaManager\Client::addSpecial
) - [x] Season (
OpenPublicMedia\PbsMediaManager\Client::addSeason
)
- [x] Asset (
- [x] PATCH support (
OpenPublicMedia\PbsMediaManager\Client::patch
)- [x] Asset (
OpenPublicMedia\PbsMediaManager\Client::updateAsset
) - [x] Episode (
OpenPublicMedia\PbsMediaManager\Client::updateEpisode
) - [x] Special (
OpenPublicMedia\PbsMediaManager\Client::updateSpecial
) - [ ]
Season(unsupported by API) - [ ]
Show(unsupported by API)
- [x] Asset (
- [x] DELETE support (
OpenPublicMedia\PbsMediaManager\Client::delete
)- [x] Asset (
OpenPublicMedia\PbsMediaManager\Client::deleteAsset
) - [x] Episode (
OpenPublicMedia\PbsMediaManager\Client::deleteEpisode
) - [x] Special (
OpenPublicMedia\PbsMediaManager\Client::deleteSpecial
) - [ ]
Season(unsupported by API)
- [x] Asset (
- [ ] Asset ingestion/replace status wrangling
v2
- [x] PHP 8 support
v3.x
- [ ] Entities for core data objects
- [ ] Advanced Asset availability handling
- [ ] Advanced Changelog endpoint operations
- [ ] Chainable query argument building (mostly for Asset search)
All versions of pbs-media-manager-php with dependencies
ext-json Version *
guzzlehttp/guzzle Version ^6.0 || ^7.0
league/uri Version ^6.5
league/uri-components Version ^2.3