{"id":15445626,"url":"https://github.com/scriptnull/he-sdk-nodejs","last_synced_at":"2025-03-26T23:30:57.504Z","repository":{"id":30982257,"uuid":"34540546","full_name":"scriptnull/he-sdk-nodejs","owner":"scriptnull","description":"Node.js SDK for HackerEarth API","archived":false,"fork":false,"pushed_at":"2015-06-30T16:37:57.000Z","size":152,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-22T17:13:29.248Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scriptnull.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-24T20:35:24.000Z","updated_at":"2019-01-23T14:06:35.000Z","dependencies_parsed_at":"2022-08-25T06:10:56.553Z","dependency_job_id":null,"html_url":"https://github.com/scriptnull/he-sdk-nodejs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptnull%2Fhe-sdk-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptnull%2Fhe-sdk-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptnull%2Fhe-sdk-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptnull%2Fhe-sdk-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scriptnull","download_url":"https://codeload.github.com/scriptnull/he-sdk-nodejs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245753858,"owners_count":20666823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T19:45:30.495Z","updated_at":"2025-03-26T23:30:57.157Z","avatar_url":"https://github.com/scriptnull.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# he-sdk-nodejs\nNode.js SDK for HackerEarth API.\n\nThis SDK helps you to compile your code with the [HackerEarth API v2](https://www.hackerearth.com/docs/api/developers/code/legacy/)\n\nYou can implement an online code compiling site in Node.js ( like [Code Table](https://code.hackerearth.com) ) with the help of this SDK.\n\n## Precheck \nRefer to the official [HackerEarth API v2 Guide](https://www.hackerearth.com/docs/api/developers/code/legacy/) for the details on using the API effectively.\n\n## Install \n```bash\nnpm install he-sdk-nodejs\n```\n\n## Require \n```javascript\nvar he = require('he-sdk-nodejs');\n```\n\n## Configure \nFetch your client secret from the [HackerEarth API Dashboard](http://www.hackerearth.com/api/register/) \n```javascript\nvar settings = {\n    'client_secret': 'type your client secret' ,\n    'async': 0 ,\n    'lang': 'CSHARP' ,\n    'time_limit': 5,\n\t'memory_limit': 262144\n};\n```\n\n## API\n\nInput your source program as a string like this \n```javascript \nvar source = \"using System;class MyClass{static void Main(string[] args) {System.Console.WriteLine(\\\"Hello World!\\\\n\\\");}}\";\n```\nor input the program from a source file by mentioning the file path like this \n```javascript\nvar filepath = \"E:\\\\E\\\\temporary files\\\\MyClass.cs\";\n```\n\n#### compile(settings , source , callback)\n```javascript\nhe.compile(settings , source , function(err , result){\n\tconsole.log(result);\n});\n```\n\n#### run(settings , source , callback)\n```javascript\nhe.run(settings , source , function(err , result){\n\tconsole.log(result);\n});\n```\n\n#### compileFile(settings , filepath , callback)\n```javascript\nhe.compileFile(settings , filepath , function(err,result){\n\tconsole.log(result);\n});\n```\n\n#### runFile(settings , filepath , callback)\n```javascript\nhe.runFile(settings , filepath , function(err,result){\n\tconsole.log(result);\n});\n```\n\n## Help \nThis package lets you compile code belonging to various programming languages via the HackerEarth API. However, If you want to implement your own code compiling server , you may take a look at [compilex](https://www.npmjs.com/package/compilex) \n\n## Samples\nHere are few samples built with this SDK. If you have got one , feel free to add it here and send a pull request or contact me.\n- [collab-and-code](https://github.com/mithunkumarnallu/collab-and-code) by [@mithunkumarnallu](https://github.com/mithunkumarnallu) \n\n## Contributing\nContributions are more than welcomed !\nYou can \n- Report a Bug\n- Write Tests\n- Help write the command line package using this SDK \n- Write an Example app and spread the word.\n\n## Disclaimer\nThe [HackerEarth API v2](https://www.hackerearth.com/docs/api/developers/code/legacy/) is a copyright of HackerEarth Inc. and this is an unofficial SDK that acts as wrapper for accessing the service provided by HackerEarth Inc.\n\n## License\nThis repository is licensed under the [MIT License](https://github.com/scriptnull/he-sdk-nodejs/blob/master/LICENSE) .\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscriptnull%2Fhe-sdk-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscriptnull%2Fhe-sdk-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscriptnull%2Fhe-sdk-nodejs/lists"}