1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-18 05:42:00 +03:00

Add getScheduler. Fix JSDoc

This commit is contained in:
Kegan Dougal
2015-12-07 11:29:02 +00:00
parent e58fb29722
commit c0178c3e80

View File

@@ -42,6 +42,7 @@ var OLM_ALGORITHM = "m.olm.v1.curve25519-aes-sha2";
* as it specifies 'sensible' defaults for these modules. * as it specifies 'sensible' defaults for these modules.
* @constructor * @constructor
* @extends {external:EventEmitter} * @extends {external:EventEmitter}
*
* @param {Object} opts The configuration options for this client. * @param {Object} opts The configuration options for this client.
* @param {string} opts.baseUrl Required. The base URL to the client-server * @param {string} opts.baseUrl Required. The base URL to the client-server
* HTTP API. * HTTP API.
@@ -51,17 +52,21 @@ var OLM_ALGORITHM = "m.olm.v1.curve25519-aes-sha2";
* requests. The value of this property is typically <code>require("request") * requests. The value of this property is typically <code>require("request")
* </code> as it returns a function which meets the required interface. See * </code> as it returns a function which meets the required interface. See
* {@link requestFunction} for more information. * {@link requestFunction} for more information.
*
* @param {string} opts.accessToken The access_token for this user. * @param {string} opts.accessToken The access_token for this user.
* @param {string} opts.userId The user ID for this user. * @param {string} opts.userId The user ID for this user.
* @param {Object} opts.store Optional. The data store to use. If not specified, * @param {Object} opts.store Optional. The data store to use. If not specified,
* this client will not store any HTTP responses. * this client will not store any HTTP responses.
*
* @param {Object} opts.scheduler Optional. The scheduler to use. If not * @param {Object} opts.scheduler Optional. The scheduler to use. If not
* specified, this client will not retry requests on failure. This client * specified, this client will not retry requests on failure. This client
* will supply its own processing function to * will supply its own processing function to
* {@link module:scheduler~MatrixScheduler#setProcessFunction}.
*
* @param {Object} opts.queryParams Optional. Extra query parameters to append * @param {Object} opts.queryParams Optional. Extra query parameters to append
* to all requests with this client. Useful for application services which require * to all requests with this client. Useful for application services which require
* <code>?user_id=</code>. * <code>?user_id=</code>.
* {@link module:scheduler~MatrixScheduler#setProcessFunction}. *
*/ */
function MatrixClient(opts) { function MatrixClient(opts) {
utils.checkObjectHasKeys(opts, ["baseUrl", "request"]); utils.checkObjectHasKeys(opts, ["baseUrl", "request"]);
@@ -201,6 +206,14 @@ MatrixClient.prototype.isGuest = function() {
return this._isGuest; return this._isGuest;
}; };
/**
* Return the provided scheduler, if any.
* @return {?module:scheduler~MatrixScheduler} The scheduler or null
*/
MatrixClient.prototype.getScheduler = function() {
return this.scheduler;
};
/** /**
* Set whether this client is a guest account. <b>This method is experimental * Set whether this client is a guest account. <b>This method is experimental
* and may change without warning.</b> * and may change without warning.</b>