52 $url =
'https://api.github.com/repos/fossology/fossology/'.$apiRequest;
54 $request = $this->curlRequestService->create($url);
56 CURLOPT_HEADER =>
true,
57 CURLOPT_RETURNTRANSFER =>
true,
58 CURLOPT_HTTPHEADER => array(
'User-Agent: fossology'),
61 $request->setOptions($curlopt);
62 $response = $request->execute();
63 if ($response !==
false) {
64 $headerSize = $request->getInfo(CURLINFO_HEADER_SIZE);
65 $resultBody = json_decode(substr($response, $headerSize),
true);
67 $resultBody = array();
80 return $this->
curlGet(
'releases/latest');
90 $since =
'?since=' . date(
'Y-m-d\\TH:i:s\\Z', time() - 3600 * 24 * $days);
91 return $this->
curlGet(
'commits' . $since);
getLatestRelease()
Get the latest release info from GitHub.
Helper class to get the latest release and commits from GitHub API.
Utility functions for specific applications.
getCommitsOfLastDays($days=30)
Get the commits from past n days.
curlGet($apiRequest)
Send a curl request to apiRequest for resource.
__construct($curlRequestService)