Can my SquareSpace / Box Ally site integrate with Wodify WODs?

Follow

Yep! Please add the below to each page you'd like the WOD displayed:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script>
    function loadFormattedWOD(selector, apiKey, date, location, program) { 
        $.ajax({
            url: 'https://app.wodify.com/API/WODs_v1.aspx', 
            data: {
                apiKey: apiKey,
                date: date,
                location: location,
                program: program,
                type: "json"
            }, 
            dataType: "json", 
            success: function(data){ 
                if(data && data.RecordList.APIWod.FormattedWOD) { 
                  $(selector).html(data.RecordList.APIWod.FormattedWOD); 
                } 
            } 
        }); 
    }
    var today = new Date();
    var dateString = today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate();
    loadFormattedWOD("#wodbody", "APIKEY GOES HERE", dateString, "YOUR LOCATION GOES HERE", "YOUR PROGRAM GOES HERE"); 

</script>
<div id="wodbody" />

You will need to update the following:

  • "apiKey": Enter the API key for the tenant here
  • "location": Enter the name of the location you wish to pull WODs from
  • "program": Enter the name of the program you wish to pull WODs from

 

Note: HTTPS is required to use the WODs API.

Comments