dailymile.com
  • Home
  • Community  
    • People
    • Routes
    • Challenges
  • Sign Up
  • Login
  • Login with Facebook
 
 

You've got to login or join dailymile to do that

  

Forgot your password?

  • Or, Create an Account
  • Connect_white_large_long

API

oEmbed

  • API Overview
  • Showcase
  • Authentication
  • Documentation
  • Explorer
  • Libraries & Code

oEmbed is an open standard that's used to embed dailymile entries on to your site. You do not need to register your application to use oEmbed. You can use oEmbed to display dailymile entries (workouts, notes, images, and videos) easily on your own site.

API Endpoint and URL Scheme

URL Scheme

  http://www.dailymile.com/people/*/entries/*
  

API endpoint

  http://api.dailymile.com/oembed?format=json
  

Discovery

Every entry page on dailymile allows discovery of its oEmbed URL via the <link> tag in the header with the type of application/json+oembed.

Example

Here's a oEmbed URL to a workout on dailymile

  http://api.dailymile.com/oembed?format=json&url=http%3A%2F%2Fwww.dailymile.com%2Fpeople%2Fben%2Fentries%2F3871109
  

Here's the oEmbed response if we request that URL

  {
    "version":"1.0",
    "type":"rich",
    "provider_name":"dailymile",
    "provider_url":"http://www.dailymile.com",
    "height":400,
    "width":200,
    "author_name":"Ben W.",
    "author_url":"http://www.dailymile.com/people/ben",
    "html":"<div class=\"oembed_container\" style=\"-moz-border-radius: 15px; -webkit-border-radius: 15px; background-color: #F8F9FA; -moz-box-shadow: 0 0 5px rgba(0,0,0,0.1) inset; -webkit-box-shadow: 0 0 5px rgba(0,0,0,0.1) inset; padding: 10px; max-width: 450px; max-height: 400px; overflow: hidden; font-family: Helvetica,Arial,sans-serif; padding: 0; margin: 0\"><div class=\"map\" style=\"width: 48.5% float: left;\"><a href=\"/routes/57034-running-route-in-san-francisco-ca\" style=\"border: 1px solid #EBEEEF; padding: 10px; background: #FFF; display: block; float: left\"><img alt=\"Panhandle to Ocean 2 (on trails)\" height=\"224\" src=\"http://maps.google.com/maps/api/staticmap?size=150x224&sensor=false&path=weight:2|color:0x0000ff|enc:gipeFv_ijV%7EIvuAJjA%3Fv%40WxB%5D%60AjCaAnB_%40lCLf%40%60%40OHJxAtDjRENg%40dE%3FzBNdAnBjFG%7ECFx%40tA%7EGf%40dDDnAIfA%5B%7CAcF%5C_%40Jg%40XeAtBiB%7CDw%40hC_%40pD%40pEX%7EBv%40%60BbAt%40j%40PjAJ%7E%40Zt%40l%40Zp%40%5CpA%7CBpMd%40%60ERpD%5E%60CAf%40%5E%7EFf%40fMd%40zSP%7EKN%7CB%3FxCO%60B%5ExFKlENvHBfFHfBRtGVvKRxEH%60GMdG%7C%40%7CNIxHLjHVfFJdGKeGWgFMkHHyH%7D%40%7DNLeGIaGSyEWwKSuGIgBCgFOwHJmE_%40yFNaB%3FyCO%7DBQ_Le%40%7BSg%40gM_%40_G%40g%40_%40aCSqDe%40aE%7DBqM%5DqA%5Bq%40u%40m%40_A%5BkAKk%40QcAu%40w%40aBY_CAqE%5EqDv%40iChB%7DDdAuBf%40Y%5EKbF%5DZ%7DAHgAEoAg%40eDuA_HGy%40F_DoBkFOeA%3F%7BBf%40eEDOuDkRKyANIg%40a%40mCMoB%5EkC%60A%5CaAVyB%3Fw%40KkA_JwuA\" width=\"150\" /></a></div><div class=\"stats\" style=\"width: 61.5%; float: left;\"><ul><li class=\"route_stat\" style=\"border-bottom: 1px solid #EBEEEF; padding: 10px 0; list-style-type: none\">        <strong class=\"stat\" style=\"display: block; font-size: 146.5%; color: #333; font-weight: bold; padding-left: 20px;\">Panhandle to Ocean 2 (on trails)</strong><span class=\"label\" style=\"font-size: 93%; color: #999; padding-left: 20px\">route title</span></li><li class=\"pace_stat\" style=\"border-bottom: 1px solid #EBEEEF; border-top: 1px solid #FFF; padding: 10px 0; list-style-type: none\"><strong class=\"stat\" style=\"display: block; font-size: 146.5%; color: #333; font-weight: bold; padding-left: 20px;\">07:50</strong><span class=\"label\" style=\"font-size: 93%; color: #999; padding-left: 20px;\">average pace</span></li><li class=\"climb_stat\" style=\"border-bottom: 1px solid #EBEEEF; border-top: 1px solid #FFF; padding: 10px 0; list-style-type: none;\"><strong class=\"stat\" style=\"display: block; font-size: 146.5%; color: #333; font-weight: bold; padding-left: 20px;\">419</strong><span class=\"label\" style=\"font-size: 93%; color: #999; padding-left: 20px;\">feet gain</span></li><li class=\"donut_stat\" style=\"border-bottom: 1px solid #EBEEEF; border-top: 1px solid #FFF; padding: 10px 0; list-style-type: none;\"><strong class=\"stat\" style=\"display: block; font-size: 146.5%; color: #333; font-weight: bold; padding-left: 20px;\">1148</strong><span class=\"label\" style=\"font-size: 93%; color: #999; padding-left: 20px;\">calories burned</span></li></ul></div><div style=\"clear: both; height: 0\"></div></div><span style=\"font-size: 93%; color: #999; display: block; padding: 5px 0;\"><a href=\"http://www.dailymile.com\" style=\"margin-right: 5px\"><img alt=\"Dailymile_16x16\" src=\"/images/dailymile_16x16.png?1288300722\" /></a><a href=\"/people/ben\">Ben</a> posted this running workout on <a href=\"http://www.dailymile.com\" style=\"font-weight: bold\">dailymile</a></span>"
  }  
  

... and here's what it'll look like on your site:

Panhandle to Ocean 2 (on trails)
  • Panhandle to Ocean 2 (on trails) route title
  • 07:50 average pace
  • 419 feet gain
  • 1148 calories burned
Dailymile_16x16Ben posted this running workout on dailymile
  • About
  • Blog
  • Apps
  • API
  • Store
  • Contact
  • Mobile

Copyright © 2008-2012 dailymile, Inc. Terms of Use | Privacy Policy

Powered by loops through Golden Gate Park in hilly San Francisco, CA

  •  Follow on twitter
  •  Fan us on facebook
Miles This Week
1 8 4 0 4 4
121,024,981 total miles shared
  • Home
  • People
  • Challenges
  • Routes
  • Events
  • Groups
  • Forums
  • About
  • Contact Us
  • Blog
  • Widgets
  • Shop
  • Help
  • Community Guidelines
  • Forgot password?

Copyright © 2012 dailymile, Inc. All rights reserved.