Skip to content

Instantly share code, notes, and snippets.

@dpfrakes
Created March 17, 2017 03:56
Show Gist options
  • Save dpfrakes/e3514b2c328d9bb7bbfa14481d4b3dae to your computer and use it in GitHub Desktop.
Save dpfrakes/e3514b2c328d9bb7bbfa14481d4b3dae to your computer and use it in GitHub Desktop.
API Hacking: Workout of the Day
$.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