chobie\Jira\Api::search PHP Method

    public function search($jql, $start_at = 0, $max_results = 20, $fields = '*navigable')
    {
        $result = $this->api(self::REQUEST_GET, '/rest/api/2/search', array('jql' => $jql, 'startAt' => $start_at, 'maxResults' => $max_results, 'fields' => $fields));
        return $result;
    }

Usage Example

Example #1
0
 public function testSearch()
 {
     $response = file_get_contents(__DIR__ . '/resources/api_search.json');
     $this->expectClientCall(Api::REQUEST_GET, '/rest/api/2/search', array('jql' => 'test', 'startAt' => 0, 'maxResults' => 2, 'fields' => 'description'), $response);
     $response_decoded = json_decode($response, true);
     $this->api->setOptions(0);
     // Don't auto-expand fields, because it makes another API call.
     $this->assertEquals(new Result($response_decoded), $this->api->search('test', 0, 2, 'description'));
 }
All Usage Examples Of chobie\Jira\Api::search