0.1.0 • Published 7 years ago

ddots-client v0.1.0

Weekly downloads
-
License
Unlicense
Repository
-
Last release
7 years ago

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

ClassMethodHTTP requestDescription
DDOTS.AuthApicreateOauthClientPOST /auth/oauth2_clients/Create a new OAuth2 Client
DDOTS.AuthApigetOAuth2ClientsGET /auth/oauth2_clients/List of OAuth2 Clients
DDOTS.AuthApioptionsOAuth2ClientsOPTIONS /auth/oauth2_clients/Check which methods are allowed
DDOTS.ProblemsApicreateProblemPOST /problems/Create a new problem
DDOTS.ProblemsApideleteProblemByIdDELETE /problems/{problem_id}Delete a problem by ID
DDOTS.ProblemsApigetProblemByIdGET /problems/{problem_id}Get problem details by ID
DDOTS.ProblemsApigetProblemTestsArchiveByIdGET /problems/{problem_id}/tests.tar.gzGet problem tests archive by ID
DDOTS.ProblemsApigetProblemsGET /problems/List of problems
DDOTS.ProblemsApioptionsProblemByIdOPTIONS /problems/{problem_id}Check which methods are allowed
DDOTS.ProblemsApioptionsProblemTestsArchiveByIdOPTIONS /problems/{problem_id}/tests.tar.gzCheck which methods are allowed
DDOTS.ProblemsApioptionsProblemsOPTIONS /problems/Check which methods are allowed
DDOTS.ProblemsApipatchProblemByIdPATCH /problems/{problem_id}Patch problem details by ID
DDOTS.ProgramminglanguagesApideleteProgrammingLanguageByNameDELETE /programming-languages/{programming_language_name}Delete a programming language by ID
DDOTS.ProgramminglanguagesApigetProgrammingLanguageByNameGET /programming-languages/{programming_language_name}Get programming language details by ID
DDOTS.ProgramminglanguagesApigetProgrammingLanguagesGET /programming-languages/List of programming languages
DDOTS.ProgramminglanguagesApioptionsProgrammingLanguageByNameOPTIONS /programming-languages/{programming_language_name}Check which methods are allowed
DDOTS.ProgramminglanguagesApioptionsProgrammingLanguagesOPTIONS /programming-languages/Check which methods are allowed
DDOTS.ProgramminglanguagesApipatchProgrammingLanguageByNamePATCH /programming-languages/{programming_language_name}Patch programming language details by name
DDOTS.ProgramminglanguagesApipostProgrammingLanguagesPOST /programming-languages/Upload a new programming language
DDOTS.SolutionsApideleteSolutionByIdDELETE /solutions/{solution_id}Delete a solution by ID
DDOTS.SolutionsApigetSolutionByIdGET /solutions/{solution_id}Get solution details by ID
DDOTS.SolutionsApigetSolutionSourceCodeByIdGET /solutions/{solution_id}/source-codeGet solution source code by ID
DDOTS.SolutionsApigetSolutionsGET /solutions/List of solutions
DDOTS.SolutionsApioptionsSolutionByIdOPTIONS /solutions/{solution_id}Check which methods are allowed
DDOTS.SolutionsApioptionsSolutionForTestingOPTIONS /solutions/latest-newCheck which methods are allowed
DDOTS.SolutionsApioptionsSolutionSourceCodeByIdOPTIONS /solutions/{solution_id}/source-codeCheck which methods are allowed
DDOTS.SolutionsApioptionsSolutionTestingReportByIdOPTIONS /solutions/{solution_id}/testing-reportCheck which methods are allowed
DDOTS.SolutionsApioptionsSolutionsOPTIONS /solutions/Check which methods are allowed
DDOTS.SolutionsApipatchSolutionByIdPATCH /solutions/{solution_id}Patch solution details by ID
DDOTS.SolutionsApipatchSolutionForTestingPATCH /solutions/latest-newFetch a solution for testing
DDOTS.SolutionsApipostSolutionTestingReportByIdPOST /solutions/{solution_id}/testing-reportSend a testing report for the solution
DDOTS.SolutionsApisendSolutionPOST /solutions/Upload a new solution
DDOTS.TeamsApideleteTeamByIdDELETE /teams/{team_id}Delete a team by ID
DDOTS.TeamsApideleteTeamMemberByIdDELETE /teams/{team_id}/members/{user_id}Remove a member from a team
DDOTS.TeamsApigetTeamByIdGET /teams/{team_id}Get team details by ID
DDOTS.TeamsApigetTeamMembersGET /teams/{team_id}/members/Get team members by team ID
DDOTS.TeamsApigetTeamsGET /teams/List of teams
DDOTS.TeamsApioptionsTeamByIdOPTIONS /teams/{team_id}Check which methods are allowed
DDOTS.TeamsApioptionsTeamMemberByIdOPTIONS /teams/{team_id}/members/{user_id}Check which methods are allowed
DDOTS.TeamsApioptionsTeamMembersOPTIONS /teams/{team_id}/members/Check which methods are allowed
DDOTS.TeamsApioptionsTeamsOPTIONS /teams/Check which methods are allowed
DDOTS.TeamsApipatchTeamByIdPATCH /teams/{team_id}Patch team details by ID
DDOTS.TeamsApipostTeamMembersPOST /teams/{team_id}/members/Add a new member to a team
DDOTS.TeamsApipostTeamsPOST /teams/Create a new team
DDOTS.UsersApicreateUserPOST /users/Create a new user
DDOTS.UsersApigetUserByIdGET /users/{user_id}Get user details by ID
DDOTS.UsersApigetUserMeGET /users/meGet current user details
DDOTS.UsersApigetUserSignupFormGET /users/signup_formGet signup form keys
DDOTS.UsersApigetUsersGET /users/List of users
DDOTS.UsersApioptionsUserByIdOPTIONS /users/{user_id}Check which methods are allowed
DDOTS.UsersApioptionsUserMeOPTIONS /users/meCheck which methods are allowed
DDOTS.UsersApioptionsUserSignupFormOPTIONS /users/signup_formCheck which methods are allowed
DDOTS.UsersApioptionsUsersOPTIONS /users/Check which methods are allowed
DDOTS.UsersApipatchUserByIdPATCH /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