ddots-client

0.1.0 • Public • Published

ddots-client

DDOTS - JavaScript client for ddots-client

Explore the demo server I suggest you start with signing up a new user. To do so, use POST /users/ endpoint with recaptcha_key=\"secret_key\". You will need to know the API Client ID to authenticate, so here it is: documentation. Sometimes (e.g. for token refreshing) you might need API Client Secret: KQ()SWK)SQK)QWSKQW(SKQ)S(QWSQW(SJ*HQ&HQW*SQ*^SSQWSGQSG. There are also two built-in users: * root (administrator with all permissions) with password q * user (regular user) with password w

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 0.1.1
  • Package version: 0.1.1
  • Build package: io.swagger.codegen.languages.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 ddots-client --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.

Getting Started

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

var DDOTS = require('ddots-client');
 
var defaultClient = DDOTS.ApiClient.instance;
 
// Configure OAuth2 access token for authorization: oauth2_password
var oauth2_password = defaultClient.authentications['oauth2_password'];
oauth2_password.accessToken = "YOUR ACCESS TOKEN"
 
var api = new DDOTS.AuthApi()
 
var defaultScopes = ["defaultScopes_example"]; // {[String]} 
 
var opts = { 
  'redirectUris': ["redirectUris_example"] // {[String]} 
};
api.createOauthClient(defaultScopes, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});
 
 

Documentation for API Endpoints

All URIs are relative to https://localhost/api/v1

Class Method HTTP request Description
DDOTS.AuthApi createOauthClient POST /auth/oauth2_clients/ Create a new OAuth2 Client
DDOTS.AuthApi getOAuth2Clients GET /auth/oauth2_clients/ List of OAuth2 Clients
DDOTS.AuthApi optionsOAuth2Clients OPTIONS /auth/oauth2_clients/ Check which methods are allowed
DDOTS.ProblemsApi createProblem POST /problems/ Create a new problem
DDOTS.ProblemsApi deleteProblemById DELETE /problems/{problem_id} Delete a problem by ID
DDOTS.ProblemsApi getProblemById GET /problems/{problem_id} Get problem details by ID
DDOTS.ProblemsApi getProblemTestsArchiveById GET /problems/{problem_id}/tests.tar.gz Get problem tests archive by ID
DDOTS.ProblemsApi getProblems GET /problems/ List of problems
DDOTS.ProblemsApi optionsProblemById OPTIONS /problems/{problem_id} Check which methods are allowed
DDOTS.ProblemsApi optionsProblemTestsArchiveById OPTIONS /problems/{problem_id}/tests.tar.gz Check which methods are allowed
DDOTS.ProblemsApi optionsProblems OPTIONS /problems/ Check which methods are allowed
DDOTS.ProblemsApi patchProblemById PATCH /problems/{problem_id} Patch problem details by ID
DDOTS.ProgramminglanguagesApi deleteProgrammingLanguageByName DELETE /programming-languages/{programming_language_name} Delete a programming language by ID
DDOTS.ProgramminglanguagesApi getProgrammingLanguageByName GET /programming-languages/{programming_language_name} Get programming language details by ID
DDOTS.ProgramminglanguagesApi getProgrammingLanguages GET /programming-languages/ List of programming languages
DDOTS.ProgramminglanguagesApi optionsProgrammingLanguageByName OPTIONS /programming-languages/{programming_language_name} Check which methods are allowed
DDOTS.ProgramminglanguagesApi optionsProgrammingLanguages OPTIONS /programming-languages/ Check which methods are allowed
DDOTS.ProgramminglanguagesApi patchProgrammingLanguageByName PATCH /programming-languages/{programming_language_name} Patch programming language details by name
DDOTS.ProgramminglanguagesApi postProgrammingLanguages POST /programming-languages/ Upload a new programming language
DDOTS.SolutionsApi deleteSolutionById DELETE /solutions/{solution_id} Delete a solution by ID
DDOTS.SolutionsApi getSolutionById GET /solutions/{solution_id} Get solution details by ID
DDOTS.SolutionsApi getSolutionSourceCodeById GET /solutions/{solution_id}/source-code Get solution source code by ID
DDOTS.SolutionsApi getSolutions GET /solutions/ List of solutions
DDOTS.SolutionsApi optionsSolutionById OPTIONS /solutions/{solution_id} Check which methods are allowed
DDOTS.SolutionsApi optionsSolutionForTesting OPTIONS /solutions/latest-new Check which methods are allowed
DDOTS.SolutionsApi optionsSolutionSourceCodeById OPTIONS /solutions/{solution_id}/source-code Check which methods are allowed
DDOTS.SolutionsApi optionsSolutionTestingReportById OPTIONS /solutions/{solution_id}/testing-report Check which methods are allowed
DDOTS.SolutionsApi optionsSolutions OPTIONS /solutions/ Check which methods are allowed
DDOTS.SolutionsApi patchSolutionById PATCH /solutions/{solution_id} Patch solution details by ID
DDOTS.SolutionsApi patchSolutionForTesting PATCH /solutions/latest-new Fetch a solution for testing
DDOTS.SolutionsApi postSolutionTestingReportById POST /solutions/{solution_id}/testing-report Send a testing report for the solution
DDOTS.SolutionsApi sendSolution POST /solutions/ Upload a new solution
DDOTS.TeamsApi deleteTeamById DELETE /teams/{team_id} Delete a team by ID
DDOTS.TeamsApi deleteTeamMemberById DELETE /teams/{team_id}/members/{user_id} Remove a member from a team
DDOTS.TeamsApi getTeamById GET /teams/{team_id} Get team details by ID
DDOTS.TeamsApi getTeamMembers GET /teams/{team_id}/members/ Get team members by team ID
DDOTS.TeamsApi getTeams GET /teams/ List of teams
DDOTS.TeamsApi optionsTeamById OPTIONS /teams/{team_id} Check which methods are allowed
DDOTS.TeamsApi optionsTeamMemberById OPTIONS /teams/{team_id}/members/{user_id} Check which methods are allowed
DDOTS.TeamsApi optionsTeamMembers OPTIONS /teams/{team_id}/members/ Check which methods are allowed
DDOTS.TeamsApi optionsTeams OPTIONS /teams/ Check which methods are allowed
DDOTS.TeamsApi patchTeamById PATCH /teams/{team_id} Patch team details by ID
DDOTS.TeamsApi postTeamMembers POST /teams/{team_id}/members/ Add a new member to a team
DDOTS.TeamsApi postTeams POST /teams/ Create a new team
DDOTS.UsersApi createUser POST /users/ Create a new user
DDOTS.UsersApi getUserById GET /users/{user_id} Get user details by ID
DDOTS.UsersApi getUserMe GET /users/me Get current user details
DDOTS.UsersApi getUserSignupForm GET /users/signup_form Get signup form keys
DDOTS.UsersApi getUsers GET /users/ List of users
DDOTS.UsersApi optionsUserById OPTIONS /users/{user_id} Check which methods are allowed
DDOTS.UsersApi optionsUserMe OPTIONS /users/me Check which methods are allowed
DDOTS.UsersApi optionsUserSignupForm OPTIONS /users/signup_form Check which methods are allowed
DDOTS.UsersApi optionsUsers OPTIONS /users/ Check which methods are allowed
DDOTS.UsersApi patchUserById PATCH /users/{user_id} Patch user details by ID

Documentation for Models

Documentation for Authorization

oauth2_password

  • Type: OAuth
  • Flow: password
  • Authorization URL:
  • Scopes:
    • auth:read: Provide access to auth details
    • auth:write: Provide write access to auth details
    • problems:read: Provide access to problem details
    • problems:write: Provide write access to problem details
    • programming_languages:read: Provide access to programming language details
    • programming_languages:write: Provide write access to programming language details
    • solutions:read: Provide access to solution details
    • solutions:write: Provide write access to solution details
    • teams:read: Provide access to team details
    • teams:write: Provide write access to team details
    • users:read: Provide access to user details
    • users:write: Provide write access to user details

Readme

Keywords

none

Package Sidebar

Install

npm i ddots-client

Weekly Downloads

1

Version

0.1.0

License

Unlicense

Last publish

Collaborators

  • frol