simva-sdk

1.0.0 • Public • Published

simva_api

SimvaApi - JavaScript client for simva_api Simva, AKA Simple Validator, AKA SurveyManager is the evolution of a tool created to integrate and ease the task of validating serious games using pre-post surveys as a control point. This version allows to create more complex studies with more variety of activities and different allocations. This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.javascript.JavaScriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install simva_api --save

git

If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var SimvaApi = require('simva_api');

var api = new SimvaApi.AdminsApi()
var opts = { 
  'searchString': "searchString_example", // {String} pass an optional search string for result filtering
  'skip': 56, // {Number} number of records to skip for pagination
  'limit': 56 // {Number} maximum number of records to return
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getGroups(opts, callback);

Documentation for API Endpoints

All URIs are relative to https://virtserver.swaggerhub.com/Synpheros/Simva/1.0.0

Class Method HTTP request Description
SimvaApi.AdminsApi getGroups GET /groups gets the list of groups where this student pl
SimvaApi.AdminsApi getMe GET /users/me Obtains your own user.
SimvaApi.AdminsApi getUsers GET /users gets the list of users.
SimvaApi.DefaultApi addUser POST /users adds a user.
SimvaApi.DefaultApi loginUser POST /users/login logs in the user obtaining an auth token
SimvaApi.StudentsApi getCompletion GET /activities/{id}/completion gets the completion status of the activity
SimvaApi.StudentsApi getGroup GET /groups/{id} gets the group with the given ID
SimvaApi.StudentsApi getGroups GET /groups gets the list of groups where this student pl
SimvaApi.StudentsApi getMe GET /users/me Obtains your own user.
SimvaApi.StudentsApi getOpenable GET /activities/{id}/openable returns if the activity can be opened or not
SimvaApi.StudentsApi getResult GET /activities/{id}/result gets the results of the activity
SimvaApi.StudentsApi getSchedule GET /studies/{id}/schedule gets the list of scheduled activities for the student
SimvaApi.StudentsApi openActivity GET /activities/{id}/open redirects the user to the activity landing
SimvaApi.StudentsApi setCompletion POST /activities/{id}/completion sets the completion status of the activity
SimvaApi.StudentsApi setCompletion_0 POST /activities/{id}/result sets the result for the activity
SimvaApi.TeachersApi addActivity POST /activities adds a Activity
SimvaApi.TeachersApi addActivityToTest POST /studies/{studyid}/tests/{testid}/activities adds a Activity to a test
SimvaApi.TeachersApi addGroup POST /groups adds a group for the current user as owner.
SimvaApi.TeachersApi addStudy POST /studies adds an study for the current teacher
SimvaApi.TeachersApi addTestToStudy POST /studies/{id}/tests adds a test to the study
SimvaApi.TeachersApi deleteActivity DELETE /activities/{id} deletes the activity with the given ID
SimvaApi.TeachersApi deleteStudy DELETE /studies/{id} Deletes the study with the given ID
SimvaApi.TeachersApi deleteTest DELETE /studies/{studyid}/tests/{testid} deletes the test with the given ID
SimvaApi.TeachersApi getActivities GET /activities gets the list of activities for the current teacher
SimvaApi.TeachersApi getActivity GET /activities/{id} gets the activity with the given ID
SimvaApi.TeachersApi getCompletion GET /activities/{id}/completion gets the completion status of the activity
SimvaApi.TeachersApi getGroup GET /groups/{id} gets the group with the given ID
SimvaApi.TeachersApi getGroupPrintable GET /groups/{id}/printable gets the printable PDF version of the group
SimvaApi.TeachersApi getGroupStudies GET /groups/{id}/studies gets the assigned studies to the group
SimvaApi.TeachersApi getGroups GET /groups gets the list of groups where this student pl
SimvaApi.TeachersApi getMe GET /users/me Obtains your own user.
SimvaApi.TeachersApi getOpenable GET /activities/{id}/openable returns if the activity can be opened or not
SimvaApi.TeachersApi getResult GET /activities/{id}/result gets the results of the activity
SimvaApi.TeachersApi getSchedule GET /studies/{id}/schedule gets the list of scheduled activities for the student
SimvaApi.TeachersApi getStudies GET /studies gets the list of studies for the current teacher
SimvaApi.TeachersApi getStudy GET /studies/{id} gets the study with the given ID
SimvaApi.TeachersApi getStudyAllocator GET /studies/{id}/allocator gets the allocator from a study
SimvaApi.TeachersApi getStudyGroups GET /studies/{id}/groups gets the assigned groups to the study
SimvaApi.TeachersApi getStudyTests GET /studies/{id}/tests gets the tests from a study
SimvaApi.TeachersApi getTest GET /studies/{studyid}/tests/{testid} gets the test with the given ID
SimvaApi.TeachersApi getTestActivities GET /studies/{studyid}/tests/{testid}/activities gets the list of activities for the selected test
SimvaApi.TeachersApi openActivity GET /activities/{id}/open redirects the user to the activity landing
SimvaApi.TeachersApi setCompletion POST /activities/{id}/completion sets the completion status of the activity
SimvaApi.TeachersApi setCompletion_0 POST /activities/{id}/result sets the result for the activity
SimvaApi.TeachersApi setStudyAllocator PUT /studies/{id}/allocator set the allocator to the study
SimvaApi.TeachersApi updateActivity PUT /activities/{id} updates the test
SimvaApi.TeachersApi updateGroup PUT /groups/{id} updates the group
SimvaApi.TeachersApi updateStudy PUT /studies/{id} updates the study
SimvaApi.TeachersApi updateTest PUT /studies/{studyid}/tests/{testid} updates the test

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

Readme

Keywords

none

Package Sidebar

Install

npm i simva-sdk

Weekly Downloads

1

Version

1.0.0

License

Apache 2.0

Unpacked Size

239 kB

Total Files

58

Last publish

Collaborators

  • synpheros