示例#1
0
 private function getWufooEntries(Application $app, $formId, $entryId)
 {
     $wufooApiEndpoint = "https://%s.wufoo.com/api/v3/forms/%s/entries.json";
     $url = sprintf($wufooApiEndpoint, $app["config"]["wufoo"]["subdomain"], $formId);
     $params = array("sort" => "EntryId", "sortDirection" => "DESC", "Filter1" => "EntryId Is_equal_to " . $entryId);
     $urlJob = new UrlQuery($url, $params);
     // Wufoo doesn't use a password, so let's use bacon
     $urlJob->setAuthentication($app["config"]["wufoo"]["apikey"], "bacon");
     return $urlJob->sendGet();
 }
示例#2
0
 /**
  * Send a GET request to fetch the data from the specified URL
  *
  * @param  string $url    The API endpoint to call
  * @param  array  $params An associative array of URL parameters that will be passed to the specific call. For
  *                        example, limiting the number of results or the pagination of results. **Warning** The API
  *                        key does NOT need to be passed here
  *
  * @since  0.1.0
  *
  * @return mixed          An associative array of the JSON response from DaPulse
  */
 protected static final function sendGet($url, $params = array())
 {
     $params["api_key"] = self::$apiKey;
     $urlQuery = new UrlQuery($url, $params);
     return $urlQuery->sendGet();
 }