Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Dailymotion Hackathon 2012

Dailymotion Hackathon 2012

Data API
•Introduction: http://dai.ly/dmapi-intro
•Reference: http://dai.ly/dmapi-reference
•Explorer: http://dai.ly/dmapi-explorer

Player API
•Reference: http://dai.ly/dmapi-player

JavaScript SDK
• SDK: http://github.com/dailymotion/dailymotion-sdk-js
• Webapp Demo: http://bit.ly/dmjsdemo

Objective-C SDK
• SDK: http://github.com/dailymotion/dailymotion-sdk-objc
• Video List App Demo: http://bit.ly/dmiosdemo
• Upload App Demo: http://bit.ly/dmiosdemo-upload

Contacts:
Twitter: https://twitter.com/Olivier_Poitrey
Email: rs at dailymotion dot com

Avatar for Olivier Poitrey

Olivier Poitrey

October 10, 2012
Tweet

Other Decks in Programming

Transcript

  1. Data API Player API • Searching • Uploading • Managing

    Metadata • Playing Videos • Controlling Playback • Listening to Events 00100011101 01010110101 01101010101 01011011111 01010010100 10101001010 10100011101 01010110101
  2. Data API is RESTFul CREATE READ UPDATE DELETE LIST POST

    /me/videos GET /video/VIDEO_ID? fields=title,owner POST /video/VIDEO_ID title=New%20title DELETE /video/VIDEO_ID GET /videos? fields=id,title&channel=fun Filterable Field Fields Selection Writeable Field Writeable Connection (/me = /user/LOGGED_USER)
  3. cnx Data API is a Graph Video - id -

    title (rw) - channel (rw,f) - owner - comments Comment - id - owner - message (rw) connection User - id - username - gender (rw) returns object returns object fields (1..n) (1..1) (1..1) rw: read-write f: filterable
  4. Object Connections •Connections are constructed like that: GET /video/VIDEO_ID/CONNECTION_NAME i.e.:

    /video/xk42/comments, /user/rs/followers •Some connections can be written •There are two types of writable connections: •Connections creating new object •Connections associating existing objects
  5. Associative Connections READ CHECK CREATE SET* DELETE GET /group/GROUP_ID/videos GET

    /group/GROUP_ID/videos/VIDEO_ID POST /group/GROUP_ID/videos/VIDEO_ID POST /playlist/PLAYLIST_ID/videos? ids=VIDEO_ID1,VIDEO_ID2,VIDEO_ID#... DELETE /group/GROUP_ID/videos/VIDEO_ID * only for reorderable connections like playlists
  6. Data API Tips • Use the fields parameter to access

    more object properties • On object fields, you can request subfields i.e.: owner.screenname (works on lists!) • Search (almost) any context by using the search parameter i.e.: /videos?search=ligue+1&sort=relevance
  7. API Explorer • Explore available resources and fields • Play

    with our API right from your browser • Test authenticated resources • Use and abuse it!