How do I post my workouts to my website?

Follow

Wodify's native WOD integration is designed for gyms that use WordPress for their web host. Click here to see how to post to your WordPress site.  However, Wodify does open its web services API for sites that enable PHP, such as with ExpressionEngine.

 

IMPORTANT: This does not apply to Wix as this is not a supported Wodify platform.

 

To find your gym's Wodify API Key:

  1. Login to Wodify Admin
  2. Click 'WOD' > 'Settings' > 'Web Integration'
  3. Under 'API Key' click 'Enable'
  4. The API Key will display


Wodify offers WOD Integration through our API by the following methods:

    • REST API


We also offer a
Program API.

 

Can My SquareSpace / Box Ally Site Integrate With Wodify WODs?

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

 

How Do I Publish WODs With ExpressionEngine?

Leverage Wodify's API to post WODs to your ExpressionEngine site.  Below is a php example:

<?php    
  if(!class_exists('GetWOD')) {        
    class GetWOD {            
      public $APIKey;            
      public $Date;            
      public $LocationText;            
      public $ProgramText;
             
      function __construct($apikey, $date, $locationtext, $programtext){         $this->APIKey = $apikey;                
        $this->Date = $date;                
        $this->LocationText = $locationtext;                
        $this->ProgramText = $programtext;            
      }        
    }    
  }
     
  $SOAPClient = new SoapClient("https://app.wodify.com/API/WOD_v1.asmx?wsdl", array('features' => SOAP_SINGLE_ELEMENT_ARRAYS));    
 
  // Call RemoteFunction ()     
  $error = 0;    
  $soapResponse = "";    
  try {        
    // CHANGE THE 'API KEY', 'LOCATION NAME', AND 'PROGRAM NAME' BELOW TO THE CORRECT VALUES!        
    $soapResponse = $SOAPClient->GetWOD(new GetWOD('API KEY', '{entry_date format="%Y-%m-%d"}', 'LOCATION NAME', 'PROGRAM NAME'));    
  } catch (SoapFault $fault) {        
    $error = 1;        
    print("Sorry, GetWOD returned the following ERROR: ".$fault->faultcode."-".$fault->faultstring);    
  }      
  if ($error == 0) {        
    if (is_null($soapResponse)) {            
      print("NULL response");        
    } else {            
      print($soapResponse->WOD->FormattedWOD);            
      print("<p><a href=\"https://app.wodify.com/PerformanceTracking/PublicWhiteboard.aspx?WhiteboardKey=mg4w0xd3xl&Date={entry_date format="%Y-%m-%d"}&ProgramName=CrossFit&LocationName=CFA\" target=\"_blank\"><img src=\"http://akroncrossfit.com/images/theme/wod-results-btn.png\" /></a></p>");        
    }    
  }
?>

 

 

 

 

Comments