SlideShare una empresa de Scribd logo
1 de 80
I’ve got a key to your API, now
                what?!?
•Presented by:
•Thomas Crenshaw – PBS (@justhomas)
•Javaun Moradi – NPR (@javaun)
Who are these guys
• Combined 30 years technical experience
• Both straddle the line between technically
  focused and experience focused
• Both work for 3 letter companies and won’t
  have to kill you for telling you that (inside the
  beltway joke)
• Fun fact: both are mountain bikers
3
Who are you? (      Who who who who   )
•   Just Radio?
•   Just TV?
•   Joint licensee?
•   Digital folks?
•   Broadcast?
•   Developers (the software kind)?
Who we think you are
• Some development experience in some development
  language (python, ruby, javascript)
• Desire to extend your site/app/presence with
  additional content
• May or may not be a joint licensee
• Know that APIs rule the 2.0 world
• May or may not know that APIs are actually web
  services
Now that introductions are out of
  the way let’s talk about APIs
We are going to go through this
 part of the presentation “Vin
        Diesel” style....
9
think of this as API speed dating




                                    10
Application Programming Interface (API)
• A flexible toolset. Not a platform, a file format, or a type of
  content.
• Reuse your own technology, or
• Use someone else’s without building it yourself.
• Skilled developers program new API applications, but
  everyone can use those new creations.
Where did NPR begin?
Create Once, Publish Everywhere (COPE)
    •   A central content repository that feeds all NPR platforms,
        stations, and partners
        NPR.org
                                                   Mobile
                              NPR API


                         Story Pieces:
                         headline, text, photos,
                         audio, video
                                                            Email
                         Story Attributes:                  Newsletters
                         Date, byline, topic,
                         program, series, artist
Partner Apps
Vision: “Let a thousand flowers bloom…”
Reality: NPR + Stations + Partners
Rise of Mobile Apps
PRX        Brad Fluebacher’s basement   NPR
Stations API
Stations API
APIs you didn’t know we had
• Transcripts                             ROBERT SIEGEL, HOST:

                    From NPR News, this is ALL THINGS CONSIDERED. I'm Robert

• User & Playlist                              Siegel.

                                         MELISSA BLOCK, HOST:

                                           And I'm Melissa Block.

                    We're marking the 50th anniversary of a children's classic that's still
                      devoured and puzzled over in reading nooks and classrooms.

                    KEVIN THOMPSON: So we got Mrs. Whatsit, what about the 2nd
                                   character that we met?

                                   UNIDENTIFIED GROUP: Mrs. Who.

                    THOMPSON: Mrs. Who, OK. What did we learn about Mrs. Who?

                          UNIDENTIFIED CHILD #1: That her glasses are thick.

                          THOMPSON: Yes, she has thick glasses. What kind of...

                              UNIDENTIFIED CHILD #2: She has spectacles.

                    THOMPSON: They call them spectacles, very good. What else is...
NPR Now…
NPR Mobile Today
Station & Show Apps!
Cars!
Experiments
NPR Doubled Page Views
                                                                                                          NPR Music
                                                              NPR                  Facebook Integration   iPhone app
                                                            iPad app




                                       Relaunched NPR
                                          mobile site




API launched
  in 2008



                                                                                                                       Player 2.0

                                                    NPR News
                                                    Android app


               NPR News                                                NPR Music            Homepage          NPR Blogs
               iPhone app                                                Remix             Improvements    Made API Friendly
                             Story Page
                            Improvements
Stations Doubling Traffic!
NPR API stuff in progress
Plugging Asset Gaps




  <externalAsset id="141487365" type="YouTube">
        <url>http://www.youtube.com/watch?v=Ws6AAhTw7RA</url>
  <http://www.youtube.com/watch?v=Ws6AAhTw7RA%3C/url%3E>

  <oEmbed>http://www.youtube.com/oembed?url=http
  %3A//www.youtube.com/watch%3Fv%3DWs6AAhTw7RA
  </oEmbed>
        <externalId>Ws6AAhTw7RA</externalId>
        <credit/>
        <parameters/>
        <caption/>
  </externalAsset>
Station Ingest:
150 by the end of 2012!
API-Centered Development
• Rule 1: Everything is an API
• Rule 2: Be RESTful
• Rule 3: Drink Your Own...
Streams & Genres APIs
GET:
/genres/10003/streams/
33
Artemis Library API
GET
/stories/?names={"or":[{"name":"Newt%20Gingrich","role":"4"},{"name":"Newt%20Gingrich","role":"1"}]}
NPR what’s next?




                   47
Station Data Project (BUS)
• Schedule information
• Bridge existing information, including:
  – Station localization
  – Streams directories
• Lots of bad puns
Stream Validation
 
Update Our Old Documentation
Better Documentation and
         Support
The API in the beginning…
 
Ingest is getting complicated
Where we’re headed
 
An API for the System
• Independent of any one CMS or data
  structure
• More flexibility
• Versioning
• Rights/permissions
Trends
JSON APIs
   XML                                                     JSON
<response>                                           {
   <status>                                              response: {
      <version>4.2</version>                                status: {
      <code>0</code>                                           version: '4.2',
      <message>Success</message>                               code: 0,
   </status>                                                   message: 'Success'
   <songs>                                                  },
      <song>                                                songs: [
         <artist_id>ARH6W4X1187B99274F</artist_id>             {
         <id>SOWKEUN12AF72AB837</id>                              artist_id: 'ARH6W4X1187B99274F',
         <artist_name>Radiohead</artist_name>                     id: 'SOWKEUN12AF72AB837',
         <title>Climbing Up The Walls</title>                     artist_name: 'Radiohead',
      </song>                                                     title: 'Climbing Up The Walls'
      <song>                                                   },
         <artist_id>ARH6W4X1187B99274F</artist_id>             {
         <id>SOXZVWD1316771449E</id>                              artist_id: 'ARH6W4X1187B99274F',
         <artist_name>Radiohead</artist_name>                     id: 'SOXZVWD1316771449E',
         <title>Fake Plastic Trees</title>                        artist_name: 'Radiohead',
      </song>                                                     title: 'Fake Plastic Trees'
      <song>                                                   },
         <artist_id>ARH6W4X1187B99274F</artist_id>             {
         <id>SOMLGKF12AB017DF3C</id>                              artist_id: 'ARH6W4X1187B99274F',
         <artist_name>Radiohead</artist_name>                     id: 'SOMLGKF12AB017DF3C',
         <title>Vegetable (Live)</title>                          artist_name: 'Radiohead',
      </song>                                                     title: 'Vegetable (Live)'
   </songs>                                                    }
</response>                                                 ]
                                                         }
                                                     }
Smaller, Simpler APIs
  GET
/genres
CMS Convergence
•   Harder to go it alone
•   A few CMS/frameworks will dominate
•   Let’s share modules! Don’t reinvent the wheel
•   http://drupal.org/project/npr
Technology: Shiny new things!
We need local, segmented audio!
An ecosystem for sharing
NPR is hiring!
http://www.npr.org/about/careers/

Digital Media (Washington, D.C.)
•Programmer III
•News Apps Editor
•Quality Assurance Engineer
•Software Developer
•Audio-Video Production Supervisor
•Product Manager, Connected Cars
•Lead User Experience Architect


Digital Services (Boston)
•Digital News Specialist
•Project Coordinator
•Programmer III
•Web Application Developer IV
•Client Services Manager
•Client Services Associate
Hey what about PBS...we have
         APIs too...
TV Schedules




I couldn’t resist the image of an Imperial Walker painted like the Mystery Machine!
although it really doesn’t have much to do with the TVSS API!
Very little knowledge passed down through the PBS Interactive group about
the origins of the TVSS API
(see “mystery” wrapping large cumbersome object....you get it now right?)
                                                                                      21
It works....
• Although not without blemishes, it does work
• Pass parameters into TVSS API
• API returns TV schedule data back
• Documentation greatly improved recently by
  WETA’s Jess Snyder
• Built for single purpose, extended overtime to
  do handle other tasks that

                                                   22
 WPT Example
http://wptschedule.org/schedulenow.php




                                         23
PBS Tune-in iOS App




                      24
COVE API
•   Request video object
•   Get video object
•   Pretty simple at its core
•   Manual key management at PBS
•   Public key available for POC




                                   58
 WordPress Plugin

WNET built it and is using it in
       production


      code is public on GitHub

                              59
60
Other APIs




             61
Image Transformation Service (ITS)
On-the-fly image resizing using URL decorators
http://image.pbs.org/ramp/programs/logos/NOVA_mezz_16x9.png
http://image.pbs.org/ramp/programs/logos/NOVA_mezz_16x9.png.resize.103x58.png
Universal User Authentication
            (UUA)




                           63
Hey PBS ... what are you working
             on now?
Localization




               65
Simplify the obvious

Passed in parameters:
    ZIP, IP or Coordinates
Return:
    Call sign
Filter and rank as necessary with
additional parameters
                                    66
Document from the beginning, not as an
            afterthought




                               67
TV Schedules Rethunk




                       68
~300 x 24 x 21 x 3 x 4 = ~1.8 million
                  records
(Actually closer to 2.629492 million records in PBS TV Schedules
             grid of information but who’s counting)




                                                                   44
Not the best user experience




                          70
assume the role of a viewer




                          71
Build a robust API that fits the viewers
 needs and the user experiences will
                follow



                                  72
Mashup




COVE API + TVSSReloaded = EPG Nirvana

                                73
One ID to rule them all




                          74
Ask the question
where can I watch a PBS program?

           Yesterday




                            75
Today



        76
Now that you know what we are doing...

 what can we do for you while we are
      doing what we are doing?

       open discussion begins.....

                 now
                                     77
API Reference
• NPR                  • PBS
  – NPR API            –   TV Schedules
  – Transcripts        –   COVE
  – User               –   ITS
  – Playlist           –   UUA
  – Stations           –   Localization
  – Streams & Genres   –   TVSS Rethunk
  – Artemis            –   PBSGUIDPROJECT

                                       78
PBS URLs
• http://open.pbs.org - open PBS
• http://answers.open.pbs.org - Q&A site
• https://github.com/pbs - PBS github site

•   http://to.pbs.org/docs-api-cove
•   http://to.pbs.org/docs-api-tvss
•   http://to.pbs.org/docs-api-its
•   http://to.pbs.org/docs-api-uua
                                         79
Questions?
Tom Crenshaw
twcrenshaw@pbs.org
@justhomas
http://open.pbs.org/

Javaun Moradi
jmoradi@npr.org
@javaun
                            64

Más contenido relacionado

La actualidad más candente

Nick Pavey_Resume
Nick Pavey_ResumeNick Pavey_Resume
Nick Pavey_Resume
Nick Pavey
 
Derek_Frankel_Sound_Designer_MixEngineer_CV
Derek_Frankel_Sound_Designer_MixEngineer_CVDerek_Frankel_Sound_Designer_MixEngineer_CV
Derek_Frankel_Sound_Designer_MixEngineer_CV
Derek Frankel
 
Web 2.0 - effecting the music industry
Web 2.0 - effecting the music industryWeb 2.0 - effecting the music industry
Web 2.0 - effecting the music industry
djwesty
 
Using mashup technology to improve findability
Using mashup technology to improve findabilityUsing mashup technology to improve findability
Using mashup technology to improve findability
Sten Govaerts
 

La actualidad más candente (13)

20211026 taicca 2 music generation
20211026 taicca 2 music generation20211026 taicca 2 music generation
20211026 taicca 2 music generation
 
Musicstreaming05 13
Musicstreaming05 13Musicstreaming05 13
Musicstreaming05 13
 
Sync- Music Synchronization Application
Sync- Music Synchronization Application Sync- Music Synchronization Application
Sync- Music Synchronization Application
 
Nick Pavey_Resume
Nick Pavey_ResumeNick Pavey_Resume
Nick Pavey_Resume
 
Web Programming Project
Web Programming ProjectWeb Programming Project
Web Programming Project
 
WhoSampled Presentation - Mixcloud 2nd Birthday Party
WhoSampled Presentation - Mixcloud 2nd Birthday PartyWhoSampled Presentation - Mixcloud 2nd Birthday Party
WhoSampled Presentation - Mixcloud 2nd Birthday Party
 
Derek_Frankel_Sound_Designer_MixEngineer_CV
Derek_Frankel_Sound_Designer_MixEngineer_CVDerek_Frankel_Sound_Designer_MixEngineer_CV
Derek_Frankel_Sound_Designer_MixEngineer_CV
 
Automatic Music Composition with Transformers, Jan 2021
Automatic Music Composition with Transformers, Jan 2021Automatic Music Composition with Transformers, Jan 2021
Automatic Music Composition with Transformers, Jan 2021
 
Machine Learning for Creative AI Applications in Music (2018 May)
Machine Learning for Creative AI Applications in Music (2018 May)Machine Learning for Creative AI Applications in Music (2018 May)
Machine Learning for Creative AI Applications in Music (2018 May)
 
楊奕軒/音樂資料檢索
楊奕軒/音樂資料檢索楊奕軒/音樂資料檢索
楊奕軒/音樂資料檢索
 
Things to Watch: Music Edition (October 2011)
Things to Watch: Music Edition (October 2011)Things to Watch: Music Edition (October 2011)
Things to Watch: Music Edition (October 2011)
 
Web 2.0 - effecting the music industry
Web 2.0 - effecting the music industryWeb 2.0 - effecting the music industry
Web 2.0 - effecting the music industry
 
Using mashup technology to improve findability
Using mashup technology to improve findabilityUsing mashup technology to improve findability
Using mashup technology to improve findability
 

Destacado (8)

Tutorial s crypto api session keys
Tutorial   s crypto api session keysTutorial   s crypto api session keys
Tutorial s crypto api session keys
 
Simplified Localization+ Presentation
Simplified Localization+ PresentationSimplified Localization+ Presentation
Simplified Localization+ Presentation
 
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
 
Pycon2013
Pycon2013Pycon2013
Pycon2013
 
PBS Presentation at AWS Summit 2012
PBS Presentation at AWS Summit 2012PBS Presentation at AWS Summit 2012
PBS Presentation at AWS Summit 2012
 
Bebicon
BebiconBebicon
Bebicon
 
past simple regular verbs
past simple regular verbspast simple regular verbs
past simple regular verbs
 
Cloud Orchestration is Broken
Cloud Orchestration is BrokenCloud Orchestration is Broken
Cloud Orchestration is Broken
 

Similar a I've Got a Key to Your API, Now What? (Joint PBS and NPR API Presentation Give at IMA Conference March 2012)

Last fm api_overview
Last fm api_overviewLast fm api_overview
Last fm api_overview
yuliang
 
Here is app.js, artist.js and songs.js file. Can you look at the my .pdf
Here is app.js, artist.js and songs.js file. Can you look at the my .pdfHere is app.js, artist.js and songs.js file. Can you look at the my .pdf
Here is app.js, artist.js and songs.js file. Can you look at the my .pdf
aggarwalshoppe14
 
MUSIC APPLICATION (1).pdf
MUSIC   APPLICATION (1).pdfMUSIC   APPLICATION (1).pdf
MUSIC APPLICATION (1).pdf
namrataSingh900842
 
Wp dev day_using_the_nokia_music_apis
Wp dev day_using_the_nokia_music_apisWp dev day_using_the_nokia_music_apis
Wp dev day_using_the_nokia_music_apis
Steve Robbins
 
Soundrop at app academy des 2012
Soundrop at app academy des 2012Soundrop at app academy des 2012
Soundrop at app academy des 2012
Inge Andre Sandvik
 

Similar a I've Got a Key to Your API, Now What? (Joint PBS and NPR API Presentation Give at IMA Conference March 2012) (20)

Last fm api_overview
Last fm api_overviewLast fm api_overview
Last fm api_overview
 
Here is app.js, artist.js and songs.js file. Can you look at the my .pdf
Here is app.js, artist.js and songs.js file. Can you look at the my .pdfHere is app.js, artist.js and songs.js file. Can you look at the my .pdf
Here is app.js, artist.js and songs.js file. Can you look at the my .pdf
 
Drupal case study: ABC Dig Music
Drupal case study: ABC Dig MusicDrupal case study: ABC Dig Music
Drupal case study: ABC Dig Music
 
NPR - NewMediaDays2010 - Flexible Content
NPR - NewMediaDays2010 - Flexible ContentNPR - NewMediaDays2010 - Flexible Content
NPR - NewMediaDays2010 - Flexible Content
 
Android Developer - Music Player from scratch GDG Cebu DevFest 2014
Android Developer - Music Player from scratch GDG Cebu DevFest 2014Android Developer - Music Player from scratch GDG Cebu DevFest 2014
Android Developer - Music Player from scratch GDG Cebu DevFest 2014
 
MUSIC APPLICATION (1).pdf
MUSIC   APPLICATION (1).pdfMUSIC   APPLICATION (1).pdf
MUSIC APPLICATION (1).pdf
 
How to build desktop apps that help your web app succeed
How to build desktop apps that help your web app succeedHow to build desktop apps that help your web app succeed
How to build desktop apps that help your web app succeed
 
NPR Presentation at Wolfram Data Summit 2010
NPR Presentation at Wolfram Data Summit 2010NPR Presentation at Wolfram Data Summit 2010
NPR Presentation at Wolfram Data Summit 2010
 
Graph Analysis over JSON, Larus
Graph Analysis over JSON, LarusGraph Analysis over JSON, Larus
Graph Analysis over JSON, Larus
 
Me and my importers
Me and my importersMe and my importers
Me and my importers
 
RecordPlug & plugXchange
RecordPlug & plugXchangeRecordPlug & plugXchange
RecordPlug & plugXchange
 
Wp dev day_using_the_nokia_music_apis
Wp dev day_using_the_nokia_music_apisWp dev day_using_the_nokia_music_apis
Wp dev day_using_the_nokia_music_apis
 
Perl in the Internet of Things
Perl in the Internet of ThingsPerl in the Internet of Things
Perl in the Internet of Things
 
Soundrop at app academy des 2012
Soundrop at app academy des 2012Soundrop at app academy des 2012
Soundrop at app academy des 2012
 
NPR API Usage and Metrics
NPR API Usage and MetricsNPR API Usage and Metrics
NPR API Usage and Metrics
 
Technology is the new rock n roll
Technology is the new rock n rollTechnology is the new rock n roll
Technology is the new rock n roll
 
Mining the social web for music-related data: a hands-on tutorial
Mining the social web for music-related data: a hands-on tutorialMining the social web for music-related data: a hands-on tutorial
Mining the social web for music-related data: a hands-on tutorial
 
Mining the social web for music-related data: a hands-on tutorial
Mining the social web for music-related data: a hands-on tutorialMining the social web for music-related data: a hands-on tutorial
Mining the social web for music-related data: a hands-on tutorial
 
AuxQ Presentation #5
AuxQ Presentation #5AuxQ Presentation #5
AuxQ Presentation #5
 
創作 MusicKit 告白情歌
創作 MusicKit 告白情歌創作 MusicKit 告白情歌
創作 MusicKit 告白情歌
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

I've Got a Key to Your API, Now What? (Joint PBS and NPR API Presentation Give at IMA Conference March 2012)

  • 1. I’ve got a key to your API, now what?!? •Presented by: •Thomas Crenshaw – PBS (@justhomas) •Javaun Moradi – NPR (@javaun)
  • 2. Who are these guys • Combined 30 years technical experience • Both straddle the line between technically focused and experience focused • Both work for 3 letter companies and won’t have to kill you for telling you that (inside the beltway joke) • Fun fact: both are mountain bikers
  • 3. 3
  • 4. Who are you? ( Who who who who ) • Just Radio? • Just TV? • Joint licensee? • Digital folks? • Broadcast? • Developers (the software kind)?
  • 5. Who we think you are • Some development experience in some development language (python, ruby, javascript) • Desire to extend your site/app/presence with additional content • May or may not be a joint licensee • Know that APIs rule the 2.0 world • May or may not know that APIs are actually web services
  • 6. Now that introductions are out of the way let’s talk about APIs
  • 7. We are going to go through this part of the presentation “Vin Diesel” style....
  • 8. 9
  • 9. think of this as API speed dating 10
  • 10. Application Programming Interface (API) • A flexible toolset. Not a platform, a file format, or a type of content. • Reuse your own technology, or • Use someone else’s without building it yourself. • Skilled developers program new API applications, but everyone can use those new creations.
  • 11. Where did NPR begin?
  • 12. Create Once, Publish Everywhere (COPE) • A central content repository that feeds all NPR platforms, stations, and partners NPR.org Mobile NPR API Story Pieces: headline, text, photos, audio, video Email Story Attributes: Newsletters Date, byline, topic, program, series, artist Partner Apps
  • 13. Vision: “Let a thousand flowers bloom…”
  • 14. Reality: NPR + Stations + Partners
  • 15. Rise of Mobile Apps PRX Brad Fluebacher’s basement NPR
  • 18. APIs you didn’t know we had • Transcripts ROBERT SIEGEL, HOST: From NPR News, this is ALL THINGS CONSIDERED. I'm Robert • User & Playlist Siegel. MELISSA BLOCK, HOST: And I'm Melissa Block. We're marking the 50th anniversary of a children's classic that's still devoured and puzzled over in reading nooks and classrooms. KEVIN THOMPSON: So we got Mrs. Whatsit, what about the 2nd character that we met? UNIDENTIFIED GROUP: Mrs. Who. THOMPSON: Mrs. Who, OK. What did we learn about Mrs. Who? UNIDENTIFIED CHILD #1: That her glasses are thick. THOMPSON: Yes, she has thick glasses. What kind of... UNIDENTIFIED CHILD #2: She has spectacles. THOMPSON: They call them spectacles, very good. What else is...
  • 21. Station & Show Apps!
  • 22. Cars!
  • 24. NPR Doubled Page Views NPR Music NPR Facebook Integration iPhone app iPad app Relaunched NPR mobile site API launched in 2008 Player 2.0 NPR News Android app NPR News NPR Music Homepage NPR Blogs iPhone app Remix Improvements Made API Friendly Story Page Improvements
  • 26.
  • 27. NPR API stuff in progress
  • 28. Plugging Asset Gaps <externalAsset id="141487365" type="YouTube"> <url>http://www.youtube.com/watch?v=Ws6AAhTw7RA</url> <http://www.youtube.com/watch?v=Ws6AAhTw7RA%3C/url%3E> <oEmbed>http://www.youtube.com/oembed?url=http %3A//www.youtube.com/watch%3Fv%3DWs6AAhTw7RA </oEmbed> <externalId>Ws6AAhTw7RA</externalId> <credit/> <parameters/> <caption/> </externalAsset>
  • 29. Station Ingest: 150 by the end of 2012!
  • 30.
  • 31. API-Centered Development • Rule 1: Everything is an API • Rule 2: Be RESTful • Rule 3: Drink Your Own...
  • 32. Streams & Genres APIs GET: /genres/10003/streams/
  • 33. 33
  • 35.
  • 37. Station Data Project (BUS) • Schedule information • Bridge existing information, including: – Station localization – Streams directories • Lots of bad puns
  • 39. Update Our Old Documentation
  • 41. The API in the beginning…  
  • 42. Ingest is getting complicated
  • 44. An API for the System • Independent of any one CMS or data structure • More flexibility • Versioning • Rights/permissions
  • 46. JSON APIs XML JSON <response> { <status> response: { <version>4.2</version> status: { <code>0</code> version: '4.2', <message>Success</message> code: 0, </status> message: 'Success' <songs> }, <song> songs: [ <artist_id>ARH6W4X1187B99274F</artist_id> { <id>SOWKEUN12AF72AB837</id> artist_id: 'ARH6W4X1187B99274F', <artist_name>Radiohead</artist_name> id: 'SOWKEUN12AF72AB837', <title>Climbing Up The Walls</title> artist_name: 'Radiohead', </song> title: 'Climbing Up The Walls' <song> }, <artist_id>ARH6W4X1187B99274F</artist_id> { <id>SOXZVWD1316771449E</id> artist_id: 'ARH6W4X1187B99274F', <artist_name>Radiohead</artist_name> id: 'SOXZVWD1316771449E', <title>Fake Plastic Trees</title> artist_name: 'Radiohead', </song> title: 'Fake Plastic Trees' <song> }, <artist_id>ARH6W4X1187B99274F</artist_id> { <id>SOMLGKF12AB017DF3C</id> artist_id: 'ARH6W4X1187B99274F', <artist_name>Radiohead</artist_name> id: 'SOMLGKF12AB017DF3C', <title>Vegetable (Live)</title> artist_name: 'Radiohead', </song> title: 'Vegetable (Live)' </songs> } </response> ] } }
  • 47. Smaller, Simpler APIs GET /genres
  • 48. CMS Convergence • Harder to go it alone • A few CMS/frameworks will dominate • Let’s share modules! Don’t reinvent the wheel • http://drupal.org/project/npr
  • 50. We need local, segmented audio!
  • 51. An ecosystem for sharing
  • 52. NPR is hiring! http://www.npr.org/about/careers/ Digital Media (Washington, D.C.) •Programmer III •News Apps Editor •Quality Assurance Engineer •Software Developer •Audio-Video Production Supervisor •Product Manager, Connected Cars •Lead User Experience Architect Digital Services (Boston) •Digital News Specialist •Project Coordinator •Programmer III •Web Application Developer IV •Client Services Manager •Client Services Associate
  • 53. Hey what about PBS...we have APIs too...
  • 54. TV Schedules I couldn’t resist the image of an Imperial Walker painted like the Mystery Machine! although it really doesn’t have much to do with the TVSS API! Very little knowledge passed down through the PBS Interactive group about the origins of the TVSS API (see “mystery” wrapping large cumbersome object....you get it now right?) 21
  • 55. It works.... • Although not without blemishes, it does work • Pass parameters into TVSS API • API returns TV schedule data back • Documentation greatly improved recently by WETA’s Jess Snyder • Built for single purpose, extended overtime to do handle other tasks that 22
  • 57. PBS Tune-in iOS App 24
  • 58. COVE API • Request video object • Get video object • Pretty simple at its core • Manual key management at PBS • Public key available for POC 58
  • 59.  WordPress Plugin WNET built it and is using it in production code is public on GitHub 59
  • 60. 60
  • 62. Image Transformation Service (ITS) On-the-fly image resizing using URL decorators http://image.pbs.org/ramp/programs/logos/NOVA_mezz_16x9.png http://image.pbs.org/ramp/programs/logos/NOVA_mezz_16x9.png.resize.103x58.png
  • 64. Hey PBS ... what are you working on now?
  • 66. Simplify the obvious Passed in parameters: ZIP, IP or Coordinates Return: Call sign Filter and rank as necessary with additional parameters 66
  • 67. Document from the beginning, not as an afterthought 67
  • 69. ~300 x 24 x 21 x 3 x 4 = ~1.8 million records (Actually closer to 2.629492 million records in PBS TV Schedules grid of information but who’s counting) 44
  • 70. Not the best user experience 70
  • 71. assume the role of a viewer 71
  • 72. Build a robust API that fits the viewers needs and the user experiences will follow 72
  • 73. Mashup COVE API + TVSSReloaded = EPG Nirvana 73
  • 74. One ID to rule them all 74
  • 75. Ask the question where can I watch a PBS program? Yesterday 75
  • 76. Today 76
  • 77. Now that you know what we are doing... what can we do for you while we are doing what we are doing? open discussion begins..... now 77
  • 78. API Reference • NPR • PBS – NPR API – TV Schedules – Transcripts – COVE – User – ITS – Playlist – UUA – Stations – Localization – Streams & Genres – TVSS Rethunk – Artemis – PBSGUIDPROJECT 78
  • 79. PBS URLs • http://open.pbs.org - open PBS • http://answers.open.pbs.org - Q&A site • https://github.com/pbs - PBS github site • http://to.pbs.org/docs-api-cove • http://to.pbs.org/docs-api-tvss • http://to.pbs.org/docs-api-its • http://to.pbs.org/docs-api-uua 79

Notas del editor

  1. Tom 14 years development experience Lives and breaths core services such as APIs Product evangelism Little known fact: lived most of his 20s on a submarine Javaun Prior to NPR: Fortune 500 companies, dot-coms Developer, experimenter, tinkerer Watching/listening since the ‘ 70s: WTTW, WBEZ, WXXI, Michigan Radio, WABE, GPTV, WAMU, WETA, MPTV
  2. Gnar! Dirt! Awesomeness!
  3. at the end we will open discussion on any of the APIs but more importantly we want to discuss with you how we can help make your life easier through our API efforts
  4. (CONSIDER GOING BACK TO JUST A FEW BULLETS ON THE NPR API, AND INSTEAD OF THIS SLIDE NAV TO SOME WEBSITES THAT USE GOOGLE MAPS API AS EXAMPLE) Who ’ s heard of the NPR api? Usually no one. What ’ s an API? No, we didn ’ t invent the term. Been around in software for over a decade. Nerdiest, sexiest thing that you ’ ve never heard about. API is not a platform. A radio, a TV, a pc, a phone are platforms. It ’ s a toolset. You build it because it allows you to create a lot of stuff over and over without reinventing the wheel each time. Also lets you use someone else ’ s tech w/o having to build or maintain. Simplest example is google maps. Who ’ s seen a real estate map w/ prices laid over geography? Show the Dr. Who map (good for a chuckle). This guy has the map on his blog. The embedded map is google ’ s, and he ’ s laid his data on top of it. Google developed maps at a huge cost ($$$$). They maintain it, improve it. When they shoot new satellite or streetview images, it automatically upgrades his Dr. Who map and he ’ s willfully ignorant of how it all works. Most APIs are tougher than this. It takes a programmer (less than 1% of the audience), but when those skilled people make good stuff, everyone can use it. So what is the NPR api? It ’ s a repository, a big bucket of all the digital content we have, easily accessible to anything that can connect to the internet. A pc, a phone, you name it. We ’ ve taken all of our content and sliced it up into pieces, so you can make requests by topic (give me environment, health, and business stories) by program (that appeared on ATC), by reporter (that are by Allison Aubry) by date, by series. Infinitely sliceable/diceable. Also, you can get whole stories are just the pieces. Give me text, photos, but not audio. Or just give me thumbnails and audio. Give me titles, links, and reporter names. The API is the big bucket of content at the center of all of our digital platforms. The website is one presentation of the API. An iPHone app is another. (will show a few more in the demos) Why is this good? We have the ultimate toolset. It means that everytime we want to put our content somewhere new, we never have to worry about how to get it there. We have everything in one place that everything can get to, and we can get it in whole or in pieces. (Sometimes I throw out examples, i.e. there ’ s a game called “ Grand Theft Auto ” where people steal cars. What if the game company came to us and said that when someone steals a car in the game, they want to be able to have the player turn on the dashboard radio and hear that day ’ s “ morning edition ” . We could do that tomorrow, the technology isn ’ t a problem because we already have this API that can put content anywhere that connects to the web – like an Xbox game console. So tech isn ’ t an issue, we ’ d ask “ is this an appropriate use of NPR content, is it the right opportunity, and how much will you pay us? ” Biggest user of the API is us. It let ’ s us create new stuff so quickly. In a way, the API makes us future proof. We don ’ t know what is coming next. We didn ’ t know we were going to make an iPhone app. Would ’ ve been so much harder and taken so much longer without the API. Second biggest user is our partners and our member stations who want better access to our stuff. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Here, I jump off to examples. Show “ Mix your own podcast ” . I make a podcast on the search term “ banjos ” . I explain that it ’ s calling to the API and saying “ get me all stories that have ‘ banjos ’ in them. But I just want to title of the story and the audio file, since that ’ s all I need for a podcast. I don ’ t need text or photos. ” In this way, my podcast is another presentation of the API. Everything is just another presentation. If there ’ s a reporter in the room, I make a podcast with their name (Howard Berkes, Karen Grigsby Bates) and ask them if it looks like the last few weeks of their life. Always a yes. I tell them to share it with their mom/stalker. If time, I may also show another use of the API, like the iGoogle Gadget. Depends on who is in the audience. Time to talk more iPHone…
  5. Every where our content appears, it’s just another presentation of the same core stories. To make a web page, I need all the pieces at once. To make a podcast, I just need the story title and the audio link. An email newsletter needs title, teaser, and thumbnail photo, but not full text or audio. A mobile device needs all the pieces, but it calls them as it needs them. The first screen is just a news river with story titles and audio indicator icons. If you click through to a story, you see text and photos and can listen to audio.
  6. We assumed that our audience would register and build things we never dreamed of.
  7. The reality is that NPR, stations, and partners were almost all of the usage.
  8. But the crowd did invent things. The first iPhone app was PRX. The second was written by Brad Bluebacher, a developer by day and NPR fan by night. This spawned the term “to be Fluebachered” in our department. It means that if throw disruptive tech out there and don’t act on it, someone will beat you to the punch. We reached out to Brad and gave him a thumbs up as we wrote our own app.
  9. Our station app provides localization by city, state, zip, or lat/long.
  10. A whole suite of new apps.
  11. Stations are getting into the act too. Expect to see a lot more convergence using many data APIs
  12. The cars app prompted us to rethink our APIs and add a few more for quality-checking streams.
  13. And of course, the Infinite Player.
  14. The interesting part about this graph is what’s not on it. We launched the API in summer 2008 but our usage (and resulting traffic) didn’t jump until a full year later when we launched the iPhone app. Disruption takes time.
  15. This has been going on for almost a year. Asset gap analysis across all platforms. What goes where – and what doesn ’ t. Complicated and what appears to be a single issue (i.e. photos) may have many roots Photos – often rights issues. Getting AP solves a majority but not all of the issue Videos – Youtube is the biggest share. There are system &amp; process reasons that other videos aren ’ t captured in our systems.
  16. This is the most important slide in the deck. 150 stations by year end, ingesting into the NPR API. We’ll have the first news platform to cover world, national, and local news. This will be a great starting point for the Public Media Platform
  17. Stations using stations’ content. This is crazy! The revolution is beginning!
  18. Our library system’s search is run solely off the API, powered by Elastic Search
  19. We’re about to begin quality checking our streams so that we can programmatically check formats and only deliver the streams that a device can actually play. We’ll also check to see if a stream is down and temporarily remove it to prevent serving a dead URL to our users.
  20. We’re about a month away from launching our new documentation site.
  21. . The API was originally centered around NPR systems because that ’ s the only way it could have ever existed.
  22. We started by going through our mechanism, but you can see it looks complicated. The business reason has changed. We ’ re asking it to be something different, and that requires philosophical and architectural changes.
  23. The API is the center of the system – everyone sends content in the same way (including NPR), and everyone pulls it out the same way. More flexibility to fit station data structures.
  24. We ’ re asking our API to something beyond what was originally envsioned – the purpose is changing. A major refactor is underway. We ’ ve already rewritten Ingest from scratch. IT ’ s a very different API under the hood, and NPR Digital Services has done a lot of work to make audio ingest faster via core publisher. They now have the fastest station audio to CDN by a wide margin.
  25. Who hear uses XML? JSON? Who loves XML? JSON? Proved my point
  26. We ’ ll see a convergence of CMS. It ’ s getting harder and harder to go it alone. We ’ re building more APIs and constantly changing the ones we have. That means you not only have to upgrade your CMS, you also have to keep pace with API updates to ingest, retrieval. We ’ ll see a few key flavors of CMS. Not surprisingly, all of them are based on open source. We want something proven, but something that we know has a community dedicated to maintaining it. Drupal is a big one. NPR Digital Services ’ Core Publsher is a Drupal CMS. Other stations and some of the folks at MPR are using Drupal. WBUR and others, including StateImpact and ARgo are using WordPress OPB, WNYC, and others are using Django-based CMSs. Django is a framework that lends itself to reuse. There are full Django CMSs, including Armstrong (Knight) and Ellison). We need to share with each other. This is too hard and we should never reinvent the wheel. Doug Gaff told me there are some Open source Drupal modules in Beta.
  27. We need to be open to new technologies that solve problems better and faster. We ’ ve used Elastic Search to great success on the Artemis Library project and giving us a powerful search engine in days, not weeks. You better believe we ’ ll keep experimenting.
  28. We really need local, segmented audio. This was just an experiment, and we don ’ t know what it will look like as a grown-up product, but it will affect almost all of our platforms. We need segmented audio for mobile, for cars. I was really proud of this one, this was our first digital radio. An exec called it “ the most disruptive thing we ever created ” . We were like cool. Then holy crap. We did this in two weeks because we knew our APIs, systems, and the member station system. But someone else could ’ ve done it. Would ’ ve taken them longer. I ’ m glad we invented it. We have to remember what ’ s gone on with newspapers. Aggregators. They ’ re chasing everything. We have to own this, we have to control our destiny. Help us.
  29. We all need to be willing to share more. More code, more content.
  30. Not really sure when it launched Not really sure what the driving business need was other than drive the national PBS electronic program guide Not really sure if there were product requirements written up or if it was skunk works I am sure that I am in the process of rebuilding
  31. Outages have been reduced The documentation has been improved Lived out its usefullness
  32. WPT uses the TVSS API (or used to) but is able to punt on the channel/headend portion of EPG
  33. Would not be possible without the API No native way to support the device
  34. Migration path from application-centric web to API-centric web COVE 2.0 portal launched on COVE API Video portal driven by combination of COVE API and Merlin API
  35. http://image.pbs.org/ramp/programs/logos/NOVA_mezz_16x9.png http://image.pbs.org/ramp/programs/logos/NOVA_mezz_16x9.png .resize.103x58.png
  36. User enters ZIP code, chooses headend (provider) which may or may not be familiar to them depending on location and finally gets what’s on a particular station Flawed user experience that puts station first and user second
  37. TV viewer really only cares about “What is on that I can watch” or “when is the next showing of my show on air” Overlap markets can play nicely together
  38. double usage out of the imperial walker painted like mystery machine image By combing the COVE API with the updated TVSS API, we will be able to host previews and other interesting user experiences within the EPG
  39. Multiple IDs on the internet that index and describe single entities whether they are programs or episodes Creating a single PBS ID and leveraging the power of the cloud, we can create a single ID that we can provide to the other content providers, both local and national
  40. Remember when there was 1 way to watch a program and you had between 4-8 channels to choose from?
  41. Connected TVs, programming on the web, station and national portals, iTunes, Hulu, Netflix are all providers of PBS content. Not just broadcast and EPGs
  42. Let us know how we can help you. What are we doing right? What are we doing wrong?