Created
March 17, 2017 03:56
-
-
Save dpfrakes/e3514b2c328d9bb7bbfa14481d4b3dae to your computer and use it in GitHub Desktop.
API Hacking: Workout of the Day
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.get('https://api.spartan.com/v6/api/get_page/?route=spartan.training.wod&secondary=spartan-wod&primary=1', function(data) { | |
var workoutHtml = data.wods[0].post_content; | |
workoutHtml = workoutHtml.split('jpg').join('x'); | |
workoutHtml = workoutHtml.split('png').join('x'); | |
document.write(workoutHtml); | |
$('img').hide(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment