Download the PHP package ankitjain28may/hackerearth-api without Composer
On this page you can find all versions of the php package ankitjain28may/hackerearth-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ankitjain28may/hackerearth-api
More information about ankitjain28may/hackerearth-api
Files in ankitjain28may/hackerearth-api
Package hackerearth-api
Short Description PHP and Laravel HackerEarth API Wrapper
License MIT
Informations about the package hackerearth-api
HackerEarth API
This package is using HackerEarth api to Compile and Run the code.
HackerEarth Code Checker API. Extremely simple REST API. Supports more than a dozen languages. All powered by reliable HackerEarth servers. You can use your own scoring system or build your own online judge.
PHP Innovation Award for the PHP package Hacker Earth API Certification Link
Installation
Run this command in your terminal from your project directory:
Laravel Configuration
When the download is complete, you have to call this package service in config/app.php
config file. To do that, add this line in app.php
in providers
array:
To use facade you have to add this line in app.php
to the aliases
array:
Now run this command in your terminal to publish this package resources:
after publishing your config file then open config/hackerearth.php
and add your hackerearth app key:
also you can add api key in .env
:
Thats it.
API List
- Run([$data, ..])
- RunFile([$data, ..])
- Compile([$data, ..])
- CompileFile([$data, ..])
Asynchronous Request
- Set
async = 1
. - You need to add the callback url, Output will be returned directly to the callback url as a post request.
Synchronous Request
- Set
async = 0
. - Output will be returned with the request's response.
For Core PHP Usage
-
create the database
- import table
For Laravel Usage
Code Compile
Code Run
Also Compile and Run files by passing realpath of the uploaded file--
Contribute
Feel free to contribute
License
Copyright (c) 2017 Ankit Jain - Released under the MIT License