1.0.0 • Published 8 years ago

judge-sdk-node v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

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.

1.0.0

8 years ago