mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-01 12:39:49 +09:00
Update to laravel 7
This commit is contained in:
@@ -61,6 +61,21 @@ class Search extends AbstractApi
|
||||
return $this->get('/search/code', ['q' => $q, 'sort' => $sort, 'order' => $order]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search code by filter (q), but will return additional data to highlight
|
||||
* the matched results.
|
||||
*
|
||||
* @link https://docs.github.com/en/rest/reference/search#text-match-metadata
|
||||
*
|
||||
* @return array list of code found
|
||||
*/
|
||||
public function codeWithMatch(string $q, string $sort = 'updated', string $order = 'desc'): array
|
||||
{
|
||||
$this->acceptHeaderValue = 'application/vnd.github.v3.text-match+json';
|
||||
|
||||
return $this->code($q, $sort, $order);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search users by filter (q).
|
||||
*
|
||||
@@ -90,14 +105,14 @@ class Search extends AbstractApi
|
||||
*/
|
||||
public function commits($q, $sort = null, $order = 'desc')
|
||||
{
|
||||
//This api is in preview mode, so set the correct accept-header
|
||||
// This api is in preview mode, so set the correct accept-header
|
||||
$this->acceptHeaderValue = 'application/vnd.github.cloak-preview';
|
||||
|
||||
return $this->get('/search/commits', ['q' => $q, 'sort' => $sort, 'order' => $order]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search commits by filter (q).
|
||||
* Search topics by filter (q).
|
||||
*
|
||||
* @link https://developer.github.com/v3/search/#search-topics
|
||||
*
|
||||
@@ -107,7 +122,7 @@ class Search extends AbstractApi
|
||||
*/
|
||||
public function topics($q)
|
||||
{
|
||||
//This api is in preview mode, so set the correct accept-header
|
||||
// This api is in preview mode, so set the correct accept-header
|
||||
$this->acceptHeaderValue = 'application/vnd.github.mercy-preview+json';
|
||||
|
||||
return $this->get('/search/topics', ['q' => $q]);
|
||||
|
||||
Reference in New Issue
Block a user