コード例 #1
0
ファイル: API.php プロジェクト: natanoj/nuBuilderPro
 /**
  * Intermediate fetch function
  * @param string $method The HTTP method
  * @param string $url The API endpoint
  * @param string $call The API method to call
  * @param array $params Additional parameters
  * @return mixed
  */
 private function fetch($method, $url, $call, array $params = array())
 {
     // Make the API call via the consumer
     $response = $this->OAuth->fetch($method, $url, $call, $params);
     // Format the response and return
     switch ($this->responseFormat) {
         case 'json':
             return json_encode($response);
         case 'jsonp':
             $response = json_encode($response);
             return $this->callback . '(' . $response . ')';
         default:
             return $response;
     }
 }
コード例 #2
0
ファイル: API.php プロジェクト: googlesky/snsp.vn
 /**
  * Intermediate fetch function
  * @param string $method The HTTP method
  * @param string $url The API endpoint
  * @param string $call The API method to call
  * @param array $params Additional parameters
  * @return mixed
  */
 private function fetch($method, $url, $call, array $params = array())
 {
     // Make the API call via the consumer
     return $this->OAuth->fetch($method, $url, $call, $params);
 }