-
Notifications
You must be signed in to change notification settings - Fork 1
~crosstalk.api.worker.list
tristanls edited this page Dec 2, 2012
·
1 revision
List available workers.
Since Version | 0.1.0 | ||
Scope | |||
accepts: | public | responds as: | ~crosstalk |
All parameters are optional, unless otherwise indicated.
crosstalkToken | 5uua22922ausllwibb1amms7a761n23n4nasAJFDUA17711 |
required Crosstalk authorization token |
workerName | myWorker |
If provided, only worker versions for this workerName will be returned |
workers | [ { WORKER }, { WORKER }, ... ] |
List of uploaded workers |
workers/WORKER | { "worker" : "myworker@1.2.3" } |
Each worker in workers list has name and version |
errorCode | 400 |
Error code compatible with HTTP status codes |
message | Something happened |
Error message |
crosstalk.emit(
'~crosstalk.api.worker.list',
{
crosstalkToken : "5uua22922ausllwibb1amms7a761n23n4nasAJFDUA17711",
},
'~crosstalk',
function ( error, response ) { /* ... */ }
);
{
workers : [
{ worker : "myWorker@1.2.1" },
{ worker : "myWorker@1.2.0" },
{ worker : "myWorker@1.1.0" },
{ worker : "myWorker@1.0.0" },
{ worker : "someWorker@1.1.4" },
{ worker : "someWorker@1.0.2" }
]
}
crosstalk.emit(
'~crosstalk.api.worker.list',
{
crosstalkToken : "5uua22922ausllwibb1amms7a761n23n4nasAJFDUA17711",
workerName : "someWorker"
},
'~crosstalk',
function ( error, response ) { /* ... */ }
);
{
workers : [
{ worker : "someWorker@1.1.4" },
{ worker : "someWorker@1.0.2" }
]
}
{
errorCode : 400,
message : "Bad Request"
}