src/api/SessionApi.js
function(apiClient) {
    this.apiClient = apiClient || ApiClient.instance;


    /**
     * Callback function to receive the result of the closeSessions operation.
     * @callback module:api/SessionApi~closeSessionsCallback
     * @param {String} error Error message, if any.
     * @param {module:model/RestOK} data The data returned by the service call.
     * @param {String} response The complete HTTP response.
     */

    /**
     * Closes session with timeout. Targets are selected by same rule to findSessions() op. While targeting multiple sessions, this operation requires same access rights with findSessions(). Closing a single session requires &#39;same session id&#39; or &#39;unrestricted workspace acceess&#39;.
     * @param {String} sessionId webida session id (usually different from socket id from sock.io)
     * @param {String} workspaceId webida workspace id in query part
     * @param {Integer} closeAfter Waiting time before actual closing, to let client save files and prevent reconnecting. 
     * @param {module:api/SessionApi~closeSessionsCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {module:model/RestOK}
     */
    this.closeSessions = function(sessionId, workspaceId, closeAfter, callback) {
      var postBody = null;

      // verify the required parameter 'sessionId' is set
      if (sessionId == undefined || sessionId == null) {
        throw "Missing the required parameter 'sessionId' when calling closeSessions";
      }

      // verify the required parameter 'workspaceId' is set
      if (workspaceId == undefined || workspaceId == null) {
        throw "Missing the required parameter 'workspaceId' when calling closeSessions";
      }

      // verify the required parameter 'closeAfter' is set
      if (closeAfter == undefined || closeAfter == null) {
        throw "Missing the required parameter 'closeAfter' when calling closeSessions";
      }


      var pathParams = {
        'sessionId': sessionId
      };
      var queryParams = {
        'workspaceId': workspaceId,
        'closeAfter': closeAfter
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['webida-simple-auth'];
      var contentTypes = ['application/json'];
      var accepts = ['application/json', 'application/octet-stream'];
      var returnType = RestOK;

      return this.apiClient.callApi(
        '/sessions/{sessionId}', 'DELETE',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    }

    /**
     * Callback function to receive the result of the findSessions operation.
     * @callback module:api/SessionApi~findSessionsCallback
     * @param {String} error Error message, if any.
     * @param {Array.<module:model/Session>} data The data returned by the service call.
     * @param {String} response The complete HTTP response.
     */

    /**
     * Finds webida sessions established to server. if session id is given, matched session info will be returned and workspace id  parameter will be ignored. To find all sessions of some workspace, set session id to &#39;*&#39; and specify workspace id.  This operation requires proper accsss rights.   1) To find all sessions, an unrestricted token is required.   2) To find some workspace sesions, token should have proper access right on the workspace. 
     * @param {String} sessionId webida session id (usually different from socket id from sock.io)
     * @param {String} workspaceId webida workspace id in query part
     * @param {module:api/SessionApi~findSessionsCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {Array.<module:model/Session>}
     */
    this.findSessions = function(sessionId, workspaceId, callback) {
      var postBody = null;

      // verify the required parameter 'sessionId' is set
      if (sessionId == undefined || sessionId == null) {
        throw "Missing the required parameter 'sessionId' when calling findSessions";
      }

      // verify the required parameter 'workspaceId' is set
      if (workspaceId == undefined || workspaceId == null) {
        throw "Missing the required parameter 'workspaceId' when calling findSessions";
      }


      var pathParams = {
        'sessionId': sessionId
      };
      var queryParams = {
        'workspaceId': workspaceId
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['webida-simple-auth'];
      var contentTypes = ['application/json'];
      var accepts = ['application/json', 'application/octet-stream'];
      var returnType = [Session];

      return this.apiClient.callApi(
        '/sessions/{sessionId}', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    }
  }
function(apiClient) {
    this.apiClient = apiClient || ApiClient.instance;


    /**
     * Callback function to receive the result of the closeSessions operation.
     * @callback module:api/SessionApi~closeSessionsCallback
     * @param {String} error Error message, if any.
     * @param {module:model/RestOK} data The data returned by the service call.
     * @param {String} response The complete HTTP response.
     */

    /**
     * Closes session with timeout. Targets are selected by same rule to findSessions() op. While targeting multiple sessions, this operation requires same access rights with findSessions(). Closing a single session requires &#39;same session id&#39; or &#39;unrestricted workspace acceess&#39;.
     * @param {String} sessionId webida session id (usually different from socket id from sock.io)
     * @param {String} workspaceId webida workspace id in query part
     * @param {Integer} closeAfter Waiting time before actual closing, to let client save files and prevent reconnecting. 
     * @param {module:api/SessionApi~closeSessionsCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {module:model/RestOK}
     */
    this.closeSessions = function(sessionId, workspaceId, closeAfter, callback) {
      var postBody = null;

      // verify the required parameter 'sessionId' is set
      if (sessionId == undefined || sessionId == null) {
        throw "Missing the required parameter 'sessionId' when calling closeSessions";
      }

      // verify the required parameter 'workspaceId' is set
      if (workspaceId == undefined || workspaceId == null) {
        throw "Missing the required parameter 'workspaceId' when calling closeSessions";
      }

      // verify the required parameter 'closeAfter' is set
      if (closeAfter == undefined || closeAfter == null) {
        throw "Missing the required parameter 'closeAfter' when calling closeSessions";
      }


      var pathParams = {
        'sessionId': sessionId
      };
      var queryParams = {
        'workspaceId': workspaceId,
        'closeAfter': closeAfter
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['webida-simple-auth'];
      var contentTypes = ['application/json'];
      var accepts = ['application/json', 'application/octet-stream'];
      var returnType = RestOK;

      return this.apiClient.callApi(
        '/sessions/{sessionId}', 'DELETE',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    }

    /**
     * Callback function to receive the result of the findSessions operation.
     * @callback module:api/SessionApi~findSessionsCallback
     * @param {String} error Error message, if any.
     * @param {Array.<module:model/Session>} data The data returned by the service call.
     * @param {String} response The complete HTTP response.
     */

    /**
     * Finds webida sessions established to server. if session id is given, matched session info will be returned and workspace id  parameter will be ignored. To find all sessions of some workspace, set session id to &#39;*&#39; and specify workspace id.  This operation requires proper accsss rights.   1) To find all sessions, an unrestricted token is required.   2) To find some workspace sesions, token should have proper access right on the workspace. 
     * @param {String} sessionId webida session id (usually different from socket id from sock.io)
     * @param {String} workspaceId webida workspace id in query part
     * @param {module:api/SessionApi~findSessionsCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {Array.<module:model/Session>}
     */
    this.findSessions = function(sessionId, workspaceId, callback) {
      var postBody = null;

      // verify the required parameter 'sessionId' is set
      if (sessionId == undefined || sessionId == null) {
        throw "Missing the required parameter 'sessionId' when calling findSessions";
      }

      // verify the required parameter 'workspaceId' is set
      if (workspaceId == undefined || workspaceId == null) {
        throw "Missing the required parameter 'workspaceId' when calling findSessions";
      }


      var pathParams = {
        'sessionId': sessionId
      };
      var queryParams = {
        'workspaceId': workspaceId
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['webida-simple-auth'];
      var contentTypes = ['application/json'];
      var accepts = ['application/json', 'application/octet-stream'];
      var returnType = [Session];

      return this.apiClient.callApi(
        '/sessions/{sessionId}', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    }
  }
function ( apiClient ) { this . apiClient = apiClient || ApiClient . instance ; /**
     * Callback function to receive the result of the closeSessions operation.
     * @callback module:api/SessionApi~closeSessionsCallback
     * @param {String} error Error message, if any.
     * @param {module:model/RestOK} data The data returned by the service call.
     * @param {String} response The complete HTTP response.
     */ /**
     * Closes session with timeout. Targets are selected by same rule to findSessions() op. While targeting multiple sessions, this operation requires same access rights with findSessions(). Closing a single session requires &#39;same session id&#39; or &#39;unrestricted workspace acceess&#39;.
     * @param {String} sessionId webida session id (usually different from socket id from sock.io)
     * @param {String} workspaceId webida workspace id in query part
     * @param {Integer} closeAfter Waiting time before actual closing, to let client save files and prevent reconnecting. 
     * @param {module:api/SessionApi~closeSessionsCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {module:model/RestOK}
     */ this . closeSessions = function ( sessionId , workspaceId , closeAfter , callback ) { var postBody = null ; // verify the required parameter 'sessionId' is set if ( sessionId == undefined || sessionId == null ) { throw "Missing the required parameter 'sessionId' when calling closeSessions" ; } // verify the required parameter 'workspaceId' is set if ( workspaceId == undefined || workspaceId == null ) { throw "Missing the required parameter 'workspaceId' when calling closeSessions" ; } // verify the required parameter 'closeAfter' is set if ( closeAfter == undefined || closeAfter == null ) { throw "Missing the required parameter 'closeAfter' when calling closeSessions" ; } var pathParams = { 'sessionId' : sessionId } ; var queryParams = { 'workspaceId' : workspaceId , 'closeAfter' : closeAfter } ; var headerParams = { } ; var formParams = { } ; var authNames = [ 'webida-simple-auth' ] ; var contentTypes = [ 'application/json' ] ; var accepts = [ 'application/json' , 'application/octet-stream' ] ; var returnType = RestOK ; return this . apiClient . callApi ( '/sessions/{sessionId}' , 'DELETE' , pathParams , queryParams , headerParams , formParams , postBody , authNames , contentTypes , accepts , returnType , callback ) ; } /**
     * Callback function to receive the result of the findSessions operation.
     * @callback module:api/SessionApi~findSessionsCallback
     * @param {String} error Error message, if any.
     * @param {Array.<module:model/Session>} data The data returned by the service call.
     * @param {String} response The complete HTTP response.
     */ /**
     * Finds webida sessions established to server. if session id is given, matched session info will be returned and workspace id  parameter will be ignored. To find all sessions of some workspace, set session id to &#39;*&#39; and specify workspace id.  This operation requires proper accsss rights.   1) To find all sessions, an unrestricted token is required.   2) To find some workspace sesions, token should have proper access right on the workspace. 
     * @param {String} sessionId webida session id (usually different from socket id from sock.io)
     * @param {String} workspaceId webida workspace id in query part
     * @param {module:api/SessionApi~findSessionsCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {Array.<module:model/Session>}
     */ this . findSessions = function ( sessionId , workspaceId , callback ) { var postBody = null ; // verify the required parameter 'sessionId' is set if ( sessionId == undefined || sessionId == null ) { throw "Missing the required parameter 'sessionId' when calling findSessions" ; } // verify the required parameter 'workspaceId' is set if ( workspaceId == undefined || workspaceId == null ) { throw "Missing the required parameter 'workspaceId' when calling findSessions" ; } var pathParams = { 'sessionId' : sessionId } ; var queryParams = { 'workspaceId' : workspaceId } ; var headerParams = { } ; var formParams = { } ; var authNames = [ 'webida-simple-auth' ] ; var contentTypes = [ 'application/json' ] ; var accepts = [ 'application/json' , 'application/octet-stream' ] ; var returnType = [ Session ] ; return this . apiClient . callApi ( '/sessions/{sessionId}' , 'GET' , pathParams , queryParams , headerParams , formParams , postBody , authNames , contentTypes , accepts , returnType , callback ) ; } }
Session service.
@module api/SessionApi
@version 0.7.1
 
Constructs a new SessionApi.
@alias module:api/SessionApi
@class
@param {module:ApiClient} apiClient Optional API client implementation to use,
default to {@link module:ApiClient#instance} if unspecified.
Session service .