1.0.0 • Published 4 years ago

simva-sdk v1.0.0

Weekly downloads
-
License
Apache 2.0
Repository
-
Last release
4 years ago

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

ClassMethodHTTP requestDescription
SimvaApi.AdminsApigetGroupsGET /groupsgets the list of groups where this student pl
SimvaApi.AdminsApigetMeGET /users/meObtains your own user.
SimvaApi.AdminsApigetUsersGET /usersgets the list of users.
SimvaApi.DefaultApiaddUserPOST /usersadds a user.
SimvaApi.DefaultApiloginUserPOST /users/loginlogs in the user obtaining an auth token
SimvaApi.StudentsApigetCompletionGET /activities/{id}/completiongets the completion status of the activity
SimvaApi.StudentsApigetGroupGET /groups/{id}gets the group with the given ID
SimvaApi.StudentsApigetGroupsGET /groupsgets the list of groups where this student pl
SimvaApi.StudentsApigetMeGET /users/meObtains your own user.
SimvaApi.StudentsApigetOpenableGET /activities/{id}/openablereturns if the activity can be opened or not
SimvaApi.StudentsApigetResultGET /activities/{id}/resultgets the results of the activity
SimvaApi.StudentsApigetScheduleGET /studies/{id}/schedulegets the list of scheduled activities for the student
SimvaApi.StudentsApiopenActivityGET /activities/{id}/openredirects the user to the activity landing
SimvaApi.StudentsApisetCompletionPOST /activities/{id}/completionsets the completion status of the activity
SimvaApi.StudentsApisetCompletion_0POST /activities/{id}/resultsets the result for the activity
SimvaApi.TeachersApiaddActivityPOST /activitiesadds a Activity
SimvaApi.TeachersApiaddActivityToTestPOST /studies/{studyid}/tests/{testid}/activitiesadds a Activity to a test
SimvaApi.TeachersApiaddGroupPOST /groupsadds a group for the current user as owner.
SimvaApi.TeachersApiaddStudyPOST /studiesadds an study for the current teacher
SimvaApi.TeachersApiaddTestToStudyPOST /studies/{id}/testsadds a test to the study
SimvaApi.TeachersApideleteActivityDELETE /activities/{id}deletes the activity with the given ID
SimvaApi.TeachersApideleteStudyDELETE /studies/{id}Deletes the study with the given ID
SimvaApi.TeachersApideleteTestDELETE /studies/{studyid}/tests/{testid}deletes the test with the given ID
SimvaApi.TeachersApigetActivitiesGET /activitiesgets the list of activities for the current teacher
SimvaApi.TeachersApigetActivityGET /activities/{id}gets the activity with the given ID
SimvaApi.TeachersApigetCompletionGET /activities/{id}/completiongets the completion status of the activity
SimvaApi.TeachersApigetGroupGET /groups/{id}gets the group with the given ID
SimvaApi.TeachersApigetGroupPrintableGET /groups/{id}/printablegets the printable PDF version of the group
SimvaApi.TeachersApigetGroupStudiesGET /groups/{id}/studiesgets the assigned studies to the group
SimvaApi.TeachersApigetGroupsGET /groupsgets the list of groups where this student pl
SimvaApi.TeachersApigetMeGET /users/meObtains your own user.
SimvaApi.TeachersApigetOpenableGET /activities/{id}/openablereturns if the activity can be opened or not
SimvaApi.TeachersApigetResultGET /activities/{id}/resultgets the results of the activity
SimvaApi.TeachersApigetScheduleGET /studies/{id}/schedulegets the list of scheduled activities for the student
SimvaApi.TeachersApigetStudiesGET /studiesgets the list of studies for the current teacher
SimvaApi.TeachersApigetStudyGET /studies/{id}gets the study with the given ID
SimvaApi.TeachersApigetStudyAllocatorGET /studies/{id}/allocatorgets the allocator from a study
SimvaApi.TeachersApigetStudyGroupsGET /studies/{id}/groupsgets the assigned groups to the study
SimvaApi.TeachersApigetStudyTestsGET /studies/{id}/testsgets the tests from a study
SimvaApi.TeachersApigetTestGET /studies/{studyid}/tests/{testid}gets the test with the given ID
SimvaApi.TeachersApigetTestActivitiesGET /studies/{studyid}/tests/{testid}/activitiesgets the list of activities for the selected test
SimvaApi.TeachersApiopenActivityGET /activities/{id}/openredirects the user to the activity landing
SimvaApi.TeachersApisetCompletionPOST /activities/{id}/completionsets the completion status of the activity
SimvaApi.TeachersApisetCompletion_0POST /activities/{id}/resultsets the result for the activity
SimvaApi.TeachersApisetStudyAllocatorPUT /studies/{id}/allocatorset the allocator to the study
SimvaApi.TeachersApiupdateActivityPUT /activities/{id}updates the test
SimvaApi.TeachersApiupdateGroupPUT /groups/{id}updates the group
SimvaApi.TeachersApiupdateStudyPUT /studies/{id}updates the study
SimvaApi.TeachersApiupdateTestPUT /studies/{studyid}/tests/{testid}updates the test

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.