-
-
Notifications
You must be signed in to change notification settings - Fork 598
Closed
Labels
Description
Hi, thanks for your wrapper of GitHub API! We can search code using
$files = $client->api('search')->code('@todo language:php');
But, could you add a function to get the matched code, as explained in the official documentation? This would be a copy of code
. It may be better to add another argument (rather than creating a new function, up to you), but this code is working for me (inside Search.php)
public function code_match($q, $sort = 'updated', $order = 'desc')
{
$this->acceptHeaderValue = 'application/vnd.github.v3.text-match+json';
return $this->get('/search/code', ['q' => $q, 'sort' => $sort, 'order' => $order]);
}