private function runCurl($curl_url, $module) {

        $curl_token_auth = 'Authorization: token ' . $module->github_token;

        $ch = curl_init($curl_url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array('User-Agent: Awesome-Octocat-App', $curl_token_auth));
        $output = curl_exec($ch);
        curl_close($ch);
        return $output;
    }
private function runCurl($curl_url, $module) {

        $curl_token_auth = 'Authorization: token ' . $module->github_token;

        $ch = curl_init($curl_url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array('User-Agent: Awesome-Octocat-App', $curl_token_auth));
        $output = curl_exec($ch);
        curl_close($ch);
        return $output;
    }
private function runCurl ( $ curl_url , $ module ) { $ curl_token_auth = 'Authorization: token ' . $ module -> github_token ; $ ch = curl_init ( $ curl_url ) ; curl_setopt ( $ ch , CURLOPT_RETURNTRANSFER , 1 ) ; curl_setopt ( $ ch , CURLOPT_HTTPHEADER , array ( 'User-Agent: Awesome-Octocat-App' , $ curl_token_auth ) ) ; $ output = curl_exec ( $ ch ) ; curl_close ( $ ch ) ; return $ output ; }
Calls the Github API using Curl and a secret Github token.
@param  string $curl_url The Github API endpoint to call
@param  Object $module   Handle to the active module
@return string           The JSON response
Calls the Github API using Curl and a secret Github token .