(context, command, public_ids = [], callback, options = {})
| 407 | }; |
| 408 | |
| 409 | function call_context_api(context, command, public_ids = [], callback, options = {}) { |
| 410 | return call_api('context', callback, options, function () { |
| 411 | let params = { |
| 412 | timestamp: utils.timestamp(), |
| 413 | public_ids: utils.build_array(public_ids), |
| 414 | command: command, |
| 415 | type: options.type |
| 416 | }; |
| 417 | if (context != null) { |
| 418 | params.context = utils.encode_context(context); |
| 419 | } |
| 420 | return [params]; |
| 421 | }); |
| 422 | } |
| 423 | |
| 424 | /** |
| 425 | * Cache (part of) the upload results. |