HackerRank.submitFile()

Submit a source code file for compilation

Usage

Hover over inputs/exits for more info.

var HackerRank = require('machinepack-hackerrank');


// Submit a source code file for compilation

HackerRank.submitFile({

apiKey: 'AAAAAAAAAAAAAA',

filePath: 'E:\\Source.cs',

language: 9,

testcases: [],

wait: true,

callbackUrl: 'http://example.com/callback',

format: 'json',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function () {

 

},

});

Inputs

apiKey required

Your HackerRank API Key

'AAAAAAAAAAAAAA'
filePath required

File path for the source code file

'E:\\Source.cs'
language required

The language key for the language, the submission is made in.Get lang key from http://api.hackerrank.com/checker/languages.json

9
testcases required

A valid JSON, which on parse should result in a list of strings.

[]
wait

if true , response will be sent after compilation and run.

true
callbackUrl

A callback url, on which the submission response will be posted as a JSON string under `data` parameter.

'http://example.com/callback'
format

must be either json or xml.

'json'

Exits

error

An unexpected error occurred.

success

OK.