Join Free
  • Inbox
    + Reply to Thread
    Results 1 to 3 of 3
    1. #1

      Help with fetchTrends()

      Hi,
      I was testing the "example" below but it doesn't return any values.

      PHP Code:
      require_once('class/Prosperent_Api.php'); 

          
      $prosperentApi = new Prosperent_Api(array( 
              
      'filterMerchant' => 'Zappos' 
          
      )); 

          
      //fetch the result 
          
      $prosperentApi->fetchTrends(); 

          
      //iterate through the facets response 
          
      echo '<table border="1">'
          
      $i=0
          foreach (
      $prosperentApi->getFacets('merchant') as $row
          { 
              
      /* 
               * if this is the first row, set the titles 
               */ 
              
      if ($i++ == 0
              { 
                  echo 
      '<tr>'

                  foreach (
      array_keys($row) as $th
                  { 
                      echo 
      '<th>' $th '</th>'
                  } 

                  echo 
      '</tr>'
              } 

              echo 
      '<tr>'

              foreach (
      $row as $value
              { 
                  echo 
      '<td>' substr($value050) . '</td>'
              } 

              echo 
      '</tr>'
          } 
          echo 
      '</table>'

    2. #2
      When calling the API with fetchTrends() make sure you add the commissionDateRange parameter as it is required.

      Example:
      PHP Code:
      require_once('class/Prosperent_Api.php');  

          
      $prosperentApi = new Prosperent_Api(array(  
              
      'filterMerchant'      => 'Zappos',
              
      'commissionDateRange' => 20120110
          
      )); 

    3. #3

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts