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