i've got a key to your api, now what? (joint pbs and npr api presentation give at ima...

Post on 22-Nov-2014

2.466 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

PBS’ Tom Crenshaw and NPR’s Javaun Moradi discuss the PBS and NPR APIs. Topics covered are radio, television and dual-licensee stations can leverage the PBS and NPR APIs to innovate and build audience on their websites, mobile devices, and beyond. Tom and Javaun discuss retrieving API content for use on station sites, putting station content into our APIs for reuse elsewhere, and finding station information based on location or call letters. They share their ideas on where the public media APIs are headed, and they look forward to hearing your questions, feedback, and pain points.

TRANSCRIPT

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?

Vision: “Let a thousand flowers bloom…”

Reality: NPR + Stations + Partners

Rise of Mobile AppsPRX Brad Fluebacher’s

basementNPR

Stations API

Stations API

APIs you didn’t know we had

• Transcripts• User & Playlist

ROBERT SIEGEL, HOST:

From NPR News, this is ALL THINGS CONSIDERED. I'm Robert 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 News iPhone app

NPR News Android app

Relaunched NPRmobile site

NPRiPad app

NPR MusiciPhone app

API launchedin 2008

NPR MusicRemix

NPR BlogsMade API Friendly

Facebook Integration

Player 2.0

Homepage Improvements

Story PageImprovements

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 APIsGET:

/genres/10003/streams/

33

Artemis Library APIGET

/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

<response> <status> <version>4.2</version> <code>0</code> <message>Success</message> </status> <songs> <song> <artist_id>ARH6W4X1187B99274F</artist_id> <id>SOWKEUN12AF72AB837</id> <artist_name>Radiohead</artist_name> <title>Climbing Up The Walls</title> </song> <song> <artist_id>ARH6W4X1187B99274F</artist_id> <id>SOXZVWD1316771449E</id> <artist_name>Radiohead</artist_name> <title>Fake Plastic Trees</title> </song> <song> <artist_id>ARH6W4X1187B99274F</artist_id> <id>SOMLGKF12AB017DF3C</id> <artist_name>Radiohead</artist_name> <title>Vegetable (Live)</title> </song> </songs></response>

{ response: { status: { version: '4.2', code: 0, message: 'Success' }, songs: [ { artist_id: 'ARH6W4X1187B99274F', id: 'SOWKEUN12AF72AB837', artist_name: 'Radiohead', title: 'Climbing Up The Walls' }, { artist_id: 'ARH6W4X1187B99274F', id: 'SOXZVWD1316771449E', artist_name: 'Radiohead', title: 'Fake Plastic Trees' }, { artist_id: 'ARH6W4X1187B99274F', id: 'SOMLGKF12AB017DF3C', artist_name: 'Radiohead', title: 'Vegetable (Live)' } ] }}

XML JSON

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

21

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 aboutthe origins of the TVSS API (see “mystery” wrapping large cumbersome object....you get it now right?)

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 Examplehttp://wptschedule.org/schedulenow.php

23

2424

PBS Tune-in iOS App

58

COVE API

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

5959

WordPress Plugin

WNET built it and is using it in production

code is public on GitHub

60

61

Other APIs

Image Transformation Service (ITS)On-the-fly image resizing using URL decorators

http://image.pbs.org/ramp/programs/logos/NOVA_mezz_16x9.pnghttp://image.pbs.org/ramp/programs/logos/NOVA_mezz_16x9.png.resize.103x58.png

63

Universal User Authentication (UUA)

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

65

Localization

66

Passed in parameters: ZIP, IP or CoordinatesReturn: Call signFilter and rank as necessary with additional parameters

Simplify the obvious

67

Document from the beginning, not as an afterthought

68

TV Schedules Rethunk

~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

7171

assume the role of a viewer

72

Build a robust API that fits the viewers needs and the user

experiences will follow

73

Mashup

COVE API + TVSSReloaded = EPG Nirvana

74

One ID to rule them all

75

Ask the questionwhere can I watch a PBS

program?Yesterday

76

Today

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

78

API Reference

• NPR– NPR API– Transcripts– User– Playlist– Stations– Streams & Genres– Artemis

• PBS– TV Schedules– COVE– ITS– UUA– Localization– TVSS Rethunk– PBSGUIDPROJECT

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

Questions?

Tom Crenshawtwcrenshaw@pbs.org@justhomashttp://open.pbs.org/

Javaun Moradijmoradi@npr.org@javaun

64

top related