-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
INT-551: Adding 2 new endpoints for listing tasks & update readme #6
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job here, I have some comments, though.
@@ -17,7 +17,8 @@ public function __construct($api) | |||
'deleteOne' => ['method' => 'DELETE', 'path' => '/teams/:teamId'], | |||
'insertTask' => ['method' => 'PUT', 'path' => '/containers/teams/:teamId'], | |||
'autoDispatch' => ['method' => 'POST', 'path' => '/teams/:teamId/dispatch'], | |||
'getWorkerEta' => ['method' => 'GET', 'path' => '/teams/:teamId/estimate', 'queryParams' => true] | |||
'getWorkerEta' => ['method' => 'GET', 'path' => '/teams/:teamId/estimate', 'queryParams' => true], | |||
'listUnassignedTasks' => ['method' => 'GET', 'path' => '/teams/:teamId/tasks', 'queryParams' => true] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had named this method getTasks
in the python wrapper so, we should keep the same names across the wrappers, shouldn't we?
@@ -25,7 +25,8 @@ public function __construct($api) | |||
'insertTask' => ['method' => 'PUT', 'path' => '/containers/workers/:workerId'], | |||
'getSchedule' => ['method' => 'GET', 'path' => '/workers/:workerId/schedule'], | |||
'setSchedule' => ['method' => 'POST', 'path' => '/workers/:workerId/schedule'], | |||
'matchMetadata' => ['method' => 'POST', 'path' => '/workers/metadata'] | |||
'matchMetadata' => ['method' => 'POST', 'path' => '/workers/metadata'], | |||
'listAssignedTasks' => ['method' => 'GET', 'path' => '/workers/:workerId/tasks', 'queryParams' => true] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had named this method getTasks
in the python wrapper so, we should keep the same names across the wrappers, shouldn't we?
"warnings" => [] | ||
] | ||
], | ||
"listUnassignedTasks" => [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to create the test case in the tests/OnfleetTest.php
file
@@ -518,6 +518,156 @@ | |||
"notes" => "Always orders our GSC special", | |||
"skipSMSNotifications" => false, | |||
"metadata" => [] | |||
], | |||
"listAssignedTasks" => [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to create the test case in the tests/OnfleetTest.php
file
Here's what's new:
listAssignedTasks
endpoint forworkers
listUnassignedTasks
endpoint forteams