openpublicmedia/pbs-station-manager-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

openpublicmedia/pbs-station-manager-php

Composer 安装命令:

composer require openpublicmedia/pbs-station-manager-php

包简介

PHP client for interacting with the PBS Station Manager API.

README 文档

README

This library abstracts interactions with the PBS Station Manager API.

Installation

Install via composer:

composer require openpublicmedia/pbs-station-manager-php

Use

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.

Examples

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');
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) "membership@kcts9.org"
  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();
var_dump(count($stations));
int(156)

Development goals

See CONTRIBUTING for information about contributing to this project.

v1

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

v2

  • PHP 8 support

统计信息

  • 总下载量: 41
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2019-07-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固