PHPackages                             shipu/hackerrank-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. shipu/hackerrank-api

ActiveLibrary[API Development](/categories/api)

shipu/hackerrank-api
====================

PHP and Laravel HackerRank Code Checker API

v1.1(8y ago)151.1k7MITPHPPHP &gt;=5.6

Since May 31Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Shipu/hackerrank-api)[ Packagist](https://packagist.org/packages/shipu/hackerrank-api)[ Docs](http://shipuahamed.com)[ RSS](/packages/shipu-hackerrank-api/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

HackerRank API
==============

[](#hackerrank-api)

[![Latest Stable Version](https://camo.githubusercontent.com/1ef9fa4ae0742d21314c9b7239aa09a9e6e5be5002e0a80059709a4cd85caf13/68747470733a2f2f706f7365722e707567782e6f72672f73686970752f6861636b657272616e6b2d6170692f762f737461626c65)](https://packagist.org/packages/shipu/hackerrank-api)[![Latest Unstable Version](https://camo.githubusercontent.com/19ad2ff4a6aab1fc4dde3196a75c1b5ce1cbc33741267f63390c5d9afaf13670/68747470733a2f2f706f7365722e707567782e6f72672f73686970752f6861636b657272616e6b2d6170692f762f756e737461626c65)](https://packagist.org/packages/shipu/hackerrank-api)[![License](https://camo.githubusercontent.com/04f25b56b1e0d6d1115054d930928360e79bd7acc0577ac502d4d6bce3fce9ff/68747470733a2f2f706f7365722e707567782e6f72672f73686970752f6861636b657272616e6b2d6170692f6c6963656e7365)](https://packagist.org/packages/shipu/hackerrank-api)

HackerRank Code Checker API. Extremely simple REST API. Supports more than a dozen languages. All powered by reliable HackerRank servers. You can use your own scoring system or build your own online judge.

40+ programming languages support.

Installation
------------

[](#installation)

Themevel is a Laravel package so you can install it via Composer. Run this command in your terminal from your project directory:

```
composer require shipu/hackerrank-api
```

Wait for a while, Composer will automatically install Themevel in your project.

Laravel Configuration
---------------------

[](#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:

```
Shipu\HackerRank\HackerRankServiceProvider::class,
```

To use facade you have to add this line in `app.php` to the `aliases` array:

```
'HackerRank' => Shipu\HackerRank\Facades\HackerRank::class,
```

Now run this command in your terminal to publish this package resources:

```
php artisan vendor:publish --provider="Shipu\HackerRank\HackerRankServiceProvider"

```

after publishing your config file then open `config/hackerrank.php` and add your hackerrank app key:

```
return [
    /*
    |--------------------------------------------------------------------------
    | HackerRank API KEY
    |--------------------------------------------------------------------------
    |
    | https://www.hackerrank.com/api/
    |
    */

    'api_key' => env('HACKERRANK_API_KEY', 'YOUR_HACKER_RANK_API_KEY'),
];
```

also you can add api key in `.env` :

```
 HACKERRANK_API_KEY = YOUR_HACKER_RANK_API_KEY

```

Thats it.

API List
--------

[](#api-list)

- languages()
- submission($lang, $source, $testcases = \[ "1" \], $format = 'json', $wait = true, $callback\_url = '')

Usages
------

[](#usages)

```
use Shipu\HackerRank\HackerRank;

$config = [
            "api_key"     => 'hackerrank_app_key',
        ];

 $hackerRank = new HackerRank($config);

 $allLanguages = $hackerRank->checker()->languages();

 var_dump($allLanguages->data);
```

For Laravel Usage
-----------------

[](#for-laravel-usage)

```
use Shipu\HackerRank\Facades\HackerRank;
//..
//..
$allLanguages = HackerRank::checker()->languages();

dd($allLanguages->data);
```

### Code Submission

[](#code-submission)

```
use Shipu\HackerRank\Facades\HackerRank;
//..
//..
$response = HackerRank::checker()->submission('php', '
