judge-sdk-node

1.0.0 • Public • Published

Judge API SDK with PHP

A simple judge api sdk write with NodeJS for OPJS.

Install

npm install judge-sdk-node --save

Usage

import Judge from 'judge-sdk-node';
 
// create a new judge instance
// $uri is the base judge api address, id and secret is your identifier
const judge = new Judge(uri, id, secret);
 
// add problem
problem = judge.addProblem(problem);
// update problem
judge.updateProblem(problemId, problem);
// remove problem
judge.removeProblem(problemId);
// add a group test files
judge.testcase(problemId, caseId, files);
// add a judge record
judge.add(record);
// query a judge record result
result = judge.query(statusId);

All objects in params are reference to API docs.

Readme

Keywords

Package Sidebar

Install

npm i judge-sdk-node

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • herobs