-
Notifications
You must be signed in to change notification settings - Fork 970
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tasks/List and Tasks/Get are now separate endpoints
- Loading branch information
1 parent
9eb573a
commit 752d5a2
Showing
4 changed files
with
81 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
|
||
namespace Elasticsearch\Endpoints\Tasks; | ||
|
||
use Elasticsearch\Common\Exceptions; | ||
use Elasticsearch\Endpoints\AbstractEndpoint; | ||
|
||
/** | ||
* Class TasksLists | ||
* | ||
* @category Elasticsearch | ||
* @package Elasticsearch\Endpoints\Tasks | ||
* @author Zachary Tong <[email protected]> | ||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 | ||
* @link http://elastic.co | ||
*/ | ||
class TasksList extends AbstractEndpoint | ||
{ | ||
|
||
/** | ||
* @throws \Elasticsearch\Common\Exceptions\RuntimeException | ||
* @return string | ||
*/ | ||
public function getURI() | ||
{ | ||
return "/_tasks"; | ||
} | ||
|
||
/** | ||
* @return string[] | ||
*/ | ||
public function getParamWhitelist() | ||
{ | ||
return array( | ||
'node_id', | ||
'actions', | ||
'detailed', | ||
'parent_node', | ||
'parent_task', | ||
'wait_for_completion', | ||
'group_by', | ||
'task_id' | ||
); | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getMethod() | ||
{ | ||
return 'GET'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters