SlideShare a Scribd company logo
1 of 33
Download to read offline
PBS Interactive API Workshop
   Edgar Román, Senior Director, Application Development, PBS
                         April 8, 2011
Overview
•  TV Schedules API
•  COVE API
Agenda : TV Schedules API
•    Getting Started
•    Understanding the models
•    Typical usage walkthrough
•    What’s next?
WPT Example
http://wptschedule.org/schedulenow.php
Getting Started: TV Schedules
•  How do I get a key?
  Fill out this form:
  http://open.pbs.org/pbs-api-key-request/
•  What kind of data is returned?
  –  Read-only REST API or XML RPC
  –  Returns XML or JSON
•  How is it protected?
  –  Simple key based authentication
Understanding the models
                                   Provider
                                (e.g. Cable Vendor)




            Head End A                                Head End B               Station
        (e.g. Cable Operator)                                                  (e.g. KRWG)




              Feed 1                     Feed 2                Feed 3           Feed 4
              (Channel)




Listing X            Listing Y                                     Listing W        Listing Z
Typical usage walkthrough
                               Start with a Zip code (Optional)
getHeadEndsByZipTagged                                                      getStationsByZip




    Find a Head End (Cable Operator)                              Pick a Station


              getStationsByHeadend

                                                         Select a Feed (Channel)
                         getFeedsWithMetadata




                          getAirdatesByFeed
                                                                  Pull Listings
Complete Example
                       (using unreadable font)
http://tvschedules.pbs.org/tvschedules/api/rest/stationFinder/getHeadendsByZipTagged?
zipcode=20818&apikey=YOUR-API-KEY

http://tvschedules.pbs.org/tvschedules/api/rest/stationFinder/getStationsByHeadend?
headendID=324045&apikey=YOUR-API-KEY

http://tvschedules.pbs.org/tvschedules/api/rest/tvSchedules/getFeedsWithMetadata?
tvDataNames=WETA&headendID=324045&apikey=YOUR-API-KEY

http://tvschedules.pbs.org/tvschedules/api/rest/stationFinder/getStationsByZip?
zipcode=20818&apikey=YOUR-API-KEY

http://tvschedules.pbs.org/tvschedules/api/rest/tvSchedules/getFeedsWithMetadata?
tvDataNames=WETA&apikey=YOUR-API-KEY

http://tvschedules.pbs.org/tvschedules/api/rest/stationFinder/getAirdatesByFeed?
feedID=9854&startTime=2010-09-15T00:00:00&endTime=2010-09-15T02:00:00&apikey=YOUR-API-
KEY
getHeadendsByZipTagged?zipcode=20001
getStationsByZip?zipcode=20001
Agenda : COVE API
•    Getting Started
•    Understanding the models
•    Available Methods
•    Typical usage walkthrough
•    How to play video
•    Authentication
•    What’s next?
Getting Started: COVE API
•  How do I get a key?
  –  Tell you in a bit
•  What kind of data is returned?
  –  Read-only REST API
  –  COVE API only returns JSON
•  How is it protected?
  –  Hefty authentication mechanism (So no jQuery
     access)
•  How can I get video?
  –  Returns only RTMP links, so roll your own HTML
     player
Understanding the models
                                              WCFE
            Producer A                      (Mountain
                                            Lake PBS)


Program X                Program Y         Rustic Living



 Video 1          Video 2        Video 3   Camp Little
                                             Pine
Methods
•  Programs
  http://api.pbs.org/cove/v1/programs/
•  Videos
  http://api.pbs.org/cove/v1/videos/
/cove/v1/programs
•  Getting all the programs
  http://api.pbs.org/cove/v1/programs/


•  Getting metadata about one program
  http://api.pbs.org/cove/v1/programs/408/
/cove/v1/programs/408 - sample
/cove/v1/programs - filters
•  Getting all national programs
  http://api.pbs.org/cove/v1/programs/?filter_producer__name=PBS



•  Getting all station programs
  http://api.pbs.org/cove/v1/programs/?filter_producer__name=KRMA
/cove/v1/videos
•  Getting all the videos
  http://api.pbs.org/cove/v1/videos/


•  Getting metadata about one video
  http://api.pbs.org/cove/v1/videos/36032/
/cove/v1/videos - filters
•  Typical query filters
  –  Only Available Videos (not expired)
  –  Of type: Episode, Clip, Segment, Promotion
  –  That belong to a particular program
  –  In a compatible encoding format
•  Typical output adjustments
  –  Give me associated images
  –  Sort by most recent airdate
  –  Give me 20 at a time
/cove/v1/videos – sample query
http://api.pbs.org/cove/v1/videos/
?filter_availability_status=Available
&exclude_type=Chapter
&filter_program=455
&filter_mediafile_set__video_encoding__eeid=
MPEG-4 500kbps
&fields=associated_images
&order_by=-airdate
&limit_start=0&limit_stop=20
Typical usage walkthrough
•  App starts and pulls a list of all relevant
   programs
•  Once user selects a program, the app
   should query for a short list of relevant
   videos
•  If a user selects a video, the app
   generates the html needed to stream
How to play video
•  The COVE API doesn’t provide HTML to
   play the video (yet)
•  Your app has to construct the HTML based
   on guidelines at:
  http://projects.pbs.org/confluence/display/coveapi/How+to+Render+Videos
Sample HTML – Simple link
•  From the video JSON, extract:
   tp_media_object_id
•  Use:
  http://video.pbs.org/videos/<tp_media_object_id>
  Or
  http://video.weta.org/videos/<tp_media_object_id>
Sample HTML – Partner Player
•  From the video JSON, extract: tp_media_object_id

<iframe id="partnerPlayer" frameborder="0"
marginwidth="0" marginheight="0" scrolling="no"
style="width:512px; height:328px;" src="http://
video.pbs.org/widget/partnerplayer/
<tp_media_object_id>/?player=<player
string>w=512&h=288&chapterbar=true&autoplay=false">
</iframe>
Sample HTML – Partner Player
          Result
Authentication
•  Every call to the endpoints must be
   authenticated
•  Based on OAuth, but is not Oauth
  –  Two-legged OAuth actually
•  Sample implementations provided on the
   documentation site
•  Front-end a jQuery app using AJAX calls
•  Active station collaborative efforts to improve existing
   products and knowledgebase
    –  Share ideas
    –  Compare tricks of the trade
    –  Solve common problems
    –  Early product access
•  April: COVE API Collaborative Competition
    –  Participants: KLRU, KPBS, Iowa PTV, TPT, KET,
       KCTS, WGBH, Maine PBN, CET, NHPTV
•  Coordinated product building activities with openPBS
   community
•  Visit spiblog.pbs.org to learn more and find out about
   future collaborative opportunities
How to get COVE API keys
•  Fill out this form:
   http://open.pbs.org/pbs-api-key-request/
•  Will start giving out keys after incubation
   lab (early May)
•  Check back often in the incubation labs for
   new API features and functionality
What’s next?
•  Easy authentication
  –  Supporting jQuery
•  Provided HTML for video playback
•  More exciting queries
  –  Tell me what you want!
Links from this presentation
•  This presentation
  http://open.pbs.org/post/2011-techcon-slides/
•  COVE API Docs
  http://projects.pbs.org/confluence/display/coveapi/Welcome

•  COVE API url
  http://api.pbs.org/cove/v1
Questions and Comments
•  Edgar Román
     emroman@pbs.org

More Related Content

Viewers also liked (19)

The Evolution of Ragheb
The Evolution of RaghebThe Evolution of Ragheb
The Evolution of Ragheb
 
Punto gt power
Punto gt powerPunto gt power
Punto gt power
 
PBS Presentation at AWS Summit 2012
PBS Presentation at AWS Summit 2012PBS Presentation at AWS Summit 2012
PBS Presentation at AWS Summit 2012
 
Simplified Localization+ Presentation
Simplified Localization+ PresentationSimplified Localization+ Presentation
Simplified Localization+ Presentation
 
past simple regular verbs
past simple regular verbspast simple regular verbs
past simple regular verbs
 
Bebicon
BebiconBebicon
Bebicon
 
Cloud Orchestration is Broken
Cloud Orchestration is BrokenCloud Orchestration is Broken
Cloud Orchestration is Broken
 
Pycon2013
Pycon2013Pycon2013
Pycon2013
 
Mobile Presentation at PBS TECH CON 2011
Mobile Presentation at PBS TECH CON 2011Mobile Presentation at PBS TECH CON 2011
Mobile Presentation at PBS TECH CON 2011
 
IBM Connect 2016 - Break out of the Box
IBM Connect 2016 - Break out of the BoxIBM Connect 2016 - Break out of the Box
IBM Connect 2016 - Break out of the Box
 
I've Got a Key to Your API, Now What? (Joint PBS and NPR API Presentation Giv...
I've Got a Key to Your API, Now What? (Joint PBS and NPR API Presentation Giv...I've Got a Key to Your API, Now What? (Joint PBS and NPR API Presentation Giv...
I've Got a Key to Your API, Now What? (Joint PBS and NPR API Presentation Giv...
 
Peformance Comparison For Large Dsp(For Distribution)
Peformance Comparison For Large Dsp(For Distribution)Peformance Comparison For Large Dsp(For Distribution)
Peformance Comparison For Large Dsp(For Distribution)
 
Câu hỏi phong van
Câu hỏi phong vanCâu hỏi phong van
Câu hỏi phong van
 
72219130 sondir
72219130 sondir72219130 sondir
72219130 sondir
 
Hitachi Oil Free
Hitachi Oil FreeHitachi Oil Free
Hitachi Oil Free
 
Architecture at PBS
Architecture at PBSArchitecture at PBS
Architecture at PBS
 
AD102 - Break out of the Box
AD102 - Break out of the BoxAD102 - Break out of the Box
AD102 - Break out of the Box
 
Teori bronfenbrenner
Teori bronfenbrennerTeori bronfenbrenner
Teori bronfenbrenner
 
Break out of The Box - Part 2
Break out of The Box - Part 2Break out of The Box - Part 2
Break out of The Box - Part 2
 

Similar to PBS Tech Con 2011 API Workshop

WHIP and Janus @ IIT-RTC 2021
WHIP and Janus @ IIT-RTC 2021WHIP and Janus @ IIT-RTC 2021
WHIP and Janus @ IIT-RTC 2021Lorenzo Miniero
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshoploodse
 
AWS July Webinar Series: Overview: Build and Manage your APIs with Amazon API...
AWS July Webinar Series: Overview: Build and Manage your APIs with Amazon API...AWS July Webinar Series: Overview: Build and Manage your APIs with Amazon API...
AWS July Webinar Series: Overview: Build and Manage your APIs with Amazon API...Amazon Web Services
 
AWS July Webinar Series - Overview Build and Manage your APs with amazon api ...
AWS July Webinar Series - Overview Build and Manage your APs with amazon api ...AWS July Webinar Series - Overview Build and Manage your APs with amazon api ...
AWS July Webinar Series - Overview Build and Manage your APs with amazon api ...Amazon Web Services
 
Route service-pcf-techmeetup
Route service-pcf-techmeetupRoute service-pcf-techmeetup
Route service-pcf-techmeetupGwenn Etourneau
 
Build and Manage Your APIs with Amazon API Gateway
Build and Manage Your APIs with Amazon API GatewayBuild and Manage Your APIs with Amazon API Gateway
Build and Manage Your APIs with Amazon API GatewayAmazon Web Services
 
A Brief History of OWIN
A Brief History of OWINA Brief History of OWIN
A Brief History of OWINRyan Riley
 
Pywps a tutorial for beginners and developers
Pywps a tutorial for beginners and developersPywps a tutorial for beginners and developers
Pywps a tutorial for beginners and developersJorge Mendes
 
Data Summer Conf 2018, “Building unified Batch and Stream processing pipeline...
Data Summer Conf 2018, “Building unified Batch and Stream processing pipeline...Data Summer Conf 2018, “Building unified Batch and Stream processing pipeline...
Data Summer Conf 2018, “Building unified Batch and Stream processing pipeline...Provectus
 
Going FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at NetflixGoing FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at NetflixYunong Xiao
 
System Testing and Integration: Test Strategy for Brahmaputra
System Testing and Integration: Test Strategy for BrahmaputraSystem Testing and Integration: Test Strategy for Brahmaputra
System Testing and Integration: Test Strategy for BrahmaputraOPNFV
 
Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)
Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)
Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)Chris Adamson
 
Hands on with CoAP and Californium
Hands on with CoAP and CaliforniumHands on with CoAP and Californium
Hands on with CoAP and CaliforniumJulien Vermillard
 
Storage Is Not Virtualized Enough - part 1
Storage Is Not Virtualized Enough - part 1Storage Is Not Virtualized Enough - part 1
Storage Is Not Virtualized Enough - part 1Zhipeng Huang
 
Server Side Swift
Server Side SwiftServer Side Swift
Server Side SwiftChad Moone
 
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)Robert Nelson
 
VoLTE Testing Solution in NFV ecosystem
VoLTE Testing Solution in NFV ecosystemVoLTE Testing Solution in NFV ecosystem
VoLTE Testing Solution in NFV ecosystemDebayan Chaudhuri
 

Similar to PBS Tech Con 2011 API Workshop (20)

WHIP and Janus @ IIT-RTC 2021
WHIP and Janus @ IIT-RTC 2021WHIP and Janus @ IIT-RTC 2021
WHIP and Janus @ IIT-RTC 2021
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshop
 
Sword Crig 2007 12 06
Sword Crig 2007 12 06Sword Crig 2007 12 06
Sword Crig 2007 12 06
 
IoT Aquarium 2
IoT Aquarium 2IoT Aquarium 2
IoT Aquarium 2
 
AWS July Webinar Series: Overview: Build and Manage your APIs with Amazon API...
AWS July Webinar Series: Overview: Build and Manage your APIs with Amazon API...AWS July Webinar Series: Overview: Build and Manage your APIs with Amazon API...
AWS July Webinar Series: Overview: Build and Manage your APIs with Amazon API...
 
AWS July Webinar Series - Overview Build and Manage your APs with amazon api ...
AWS July Webinar Series - Overview Build and Manage your APs with amazon api ...AWS July Webinar Series - Overview Build and Manage your APs with amazon api ...
AWS July Webinar Series - Overview Build and Manage your APs with amazon api ...
 
Route service-pcf-techmeetup
Route service-pcf-techmeetupRoute service-pcf-techmeetup
Route service-pcf-techmeetup
 
Build and Manage Your APIs with Amazon API Gateway
Build and Manage Your APIs with Amazon API GatewayBuild and Manage Your APIs with Amazon API Gateway
Build and Manage Your APIs with Amazon API Gateway
 
A Brief History of OWIN
A Brief History of OWINA Brief History of OWIN
A Brief History of OWIN
 
Pywps a tutorial for beginners and developers
Pywps a tutorial for beginners and developersPywps a tutorial for beginners and developers
Pywps a tutorial for beginners and developers
 
Data Summer Conf 2018, “Building unified Batch and Stream processing pipeline...
Data Summer Conf 2018, “Building unified Batch and Stream processing pipeline...Data Summer Conf 2018, “Building unified Batch and Stream processing pipeline...
Data Summer Conf 2018, “Building unified Batch and Stream processing pipeline...
 
Going FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at NetflixGoing FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at Netflix
 
System Testing and Integration: Test Strategy for Brahmaputra
System Testing and Integration: Test Strategy for BrahmaputraSystem Testing and Integration: Test Strategy for Brahmaputra
System Testing and Integration: Test Strategy for Brahmaputra
 
Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)
Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)
Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)
 
Hands on with CoAP and Californium
Hands on with CoAP and CaliforniumHands on with CoAP and Californium
Hands on with CoAP and Californium
 
Storage Is Not Virtualized Enough - part 1
Storage Is Not Virtualized Enough - part 1Storage Is Not Virtualized Enough - part 1
Storage Is Not Virtualized Enough - part 1
 
Server Side Swift
Server Side SwiftServer Side Swift
Server Side Swift
 
Getting Started With Aura
Getting Started With AuraGetting Started With Aura
Getting Started With Aura
 
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)
 
VoLTE Testing Solution in NFV ecosystem
VoLTE Testing Solution in NFV ecosystemVoLTE Testing Solution in NFV ecosystem
VoLTE Testing Solution in NFV ecosystem
 

Recently uploaded

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 

Recently uploaded (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 

PBS Tech Con 2011 API Workshop

  • 1. PBS Interactive API Workshop Edgar Román, Senior Director, Application Development, PBS April 8, 2011
  • 2. Overview •  TV Schedules API •  COVE API
  • 3. Agenda : TV Schedules API •  Getting Started •  Understanding the models •  Typical usage walkthrough •  What’s next?
  • 5. Getting Started: TV Schedules •  How do I get a key? Fill out this form: http://open.pbs.org/pbs-api-key-request/ •  What kind of data is returned? –  Read-only REST API or XML RPC –  Returns XML or JSON •  How is it protected? –  Simple key based authentication
  • 6. Understanding the models Provider (e.g. Cable Vendor) Head End A Head End B Station (e.g. Cable Operator) (e.g. KRWG) Feed 1 Feed 2 Feed 3 Feed 4 (Channel) Listing X Listing Y Listing W Listing Z
  • 7. Typical usage walkthrough Start with a Zip code (Optional) getHeadEndsByZipTagged getStationsByZip Find a Head End (Cable Operator) Pick a Station getStationsByHeadend Select a Feed (Channel) getFeedsWithMetadata getAirdatesByFeed Pull Listings
  • 8. Complete Example (using unreadable font) http://tvschedules.pbs.org/tvschedules/api/rest/stationFinder/getHeadendsByZipTagged? zipcode=20818&apikey=YOUR-API-KEY http://tvschedules.pbs.org/tvschedules/api/rest/stationFinder/getStationsByHeadend? headendID=324045&apikey=YOUR-API-KEY http://tvschedules.pbs.org/tvschedules/api/rest/tvSchedules/getFeedsWithMetadata? tvDataNames=WETA&headendID=324045&apikey=YOUR-API-KEY http://tvschedules.pbs.org/tvschedules/api/rest/stationFinder/getStationsByZip? zipcode=20818&apikey=YOUR-API-KEY http://tvschedules.pbs.org/tvschedules/api/rest/tvSchedules/getFeedsWithMetadata? tvDataNames=WETA&apikey=YOUR-API-KEY http://tvschedules.pbs.org/tvschedules/api/rest/stationFinder/getAirdatesByFeed? feedID=9854&startTime=2010-09-15T00:00:00&endTime=2010-09-15T02:00:00&apikey=YOUR-API- KEY
  • 11. Agenda : COVE API •  Getting Started •  Understanding the models •  Available Methods •  Typical usage walkthrough •  How to play video •  Authentication •  What’s next?
  • 12. Getting Started: COVE API •  How do I get a key? –  Tell you in a bit •  What kind of data is returned? –  Read-only REST API –  COVE API only returns JSON •  How is it protected? –  Hefty authentication mechanism (So no jQuery access) •  How can I get video? –  Returns only RTMP links, so roll your own HTML player
  • 13. Understanding the models WCFE Producer A (Mountain Lake PBS) Program X Program Y Rustic Living Video 1 Video 2 Video 3 Camp Little Pine
  • 14. Methods •  Programs http://api.pbs.org/cove/v1/programs/ •  Videos http://api.pbs.org/cove/v1/videos/
  • 15. /cove/v1/programs •  Getting all the programs http://api.pbs.org/cove/v1/programs/ •  Getting metadata about one program http://api.pbs.org/cove/v1/programs/408/
  • 17. /cove/v1/programs - filters •  Getting all national programs http://api.pbs.org/cove/v1/programs/?filter_producer__name=PBS •  Getting all station programs http://api.pbs.org/cove/v1/programs/?filter_producer__name=KRMA
  • 18. /cove/v1/videos •  Getting all the videos http://api.pbs.org/cove/v1/videos/ •  Getting metadata about one video http://api.pbs.org/cove/v1/videos/36032/
  • 19.
  • 20. /cove/v1/videos - filters •  Typical query filters –  Only Available Videos (not expired) –  Of type: Episode, Clip, Segment, Promotion –  That belong to a particular program –  In a compatible encoding format •  Typical output adjustments –  Give me associated images –  Sort by most recent airdate –  Give me 20 at a time
  • 21. /cove/v1/videos – sample query http://api.pbs.org/cove/v1/videos/ ?filter_availability_status=Available &exclude_type=Chapter &filter_program=455 &filter_mediafile_set__video_encoding__eeid= MPEG-4 500kbps &fields=associated_images &order_by=-airdate &limit_start=0&limit_stop=20
  • 22.
  • 23. Typical usage walkthrough •  App starts and pulls a list of all relevant programs •  Once user selects a program, the app should query for a short list of relevant videos •  If a user selects a video, the app generates the html needed to stream
  • 24. How to play video •  The COVE API doesn’t provide HTML to play the video (yet) •  Your app has to construct the HTML based on guidelines at: http://projects.pbs.org/confluence/display/coveapi/How+to+Render+Videos
  • 25. Sample HTML – Simple link •  From the video JSON, extract: tp_media_object_id •  Use: http://video.pbs.org/videos/<tp_media_object_id> Or http://video.weta.org/videos/<tp_media_object_id>
  • 26. Sample HTML – Partner Player •  From the video JSON, extract: tp_media_object_id <iframe id="partnerPlayer" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="width:512px; height:328px;" src="http:// video.pbs.org/widget/partnerplayer/ <tp_media_object_id>/?player=<player string>w=512&h=288&chapterbar=true&autoplay=false"> </iframe>
  • 27. Sample HTML – Partner Player Result
  • 28. Authentication •  Every call to the endpoints must be authenticated •  Based on OAuth, but is not Oauth –  Two-legged OAuth actually •  Sample implementations provided on the documentation site •  Front-end a jQuery app using AJAX calls
  • 29. •  Active station collaborative efforts to improve existing products and knowledgebase –  Share ideas –  Compare tricks of the trade –  Solve common problems –  Early product access •  April: COVE API Collaborative Competition –  Participants: KLRU, KPBS, Iowa PTV, TPT, KET, KCTS, WGBH, Maine PBN, CET, NHPTV •  Coordinated product building activities with openPBS community •  Visit spiblog.pbs.org to learn more and find out about future collaborative opportunities
  • 30. How to get COVE API keys •  Fill out this form: http://open.pbs.org/pbs-api-key-request/ •  Will start giving out keys after incubation lab (early May) •  Check back often in the incubation labs for new API features and functionality
  • 31. What’s next? •  Easy authentication –  Supporting jQuery •  Provided HTML for video playback •  More exciting queries –  Tell me what you want!
  • 32. Links from this presentation •  This presentation http://open.pbs.org/post/2011-techcon-slides/ •  COVE API Docs http://projects.pbs.org/confluence/display/coveapi/Welcome •  COVE API url http://api.pbs.org/cove/v1
  • 33. Questions and Comments •  Edgar Román emroman@pbs.org