hafolahbi / HNGi7-task-2

HNGi7 Task 2 (By: Team-Fierce)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HNGi7-task-2

HNGi7 Task 2 (By: Team-Fierce) <<<<<<< HEAD

HOW TO ADD YOUR SCRIPTS TO THIS REPO

  1. Fork this repository

  2. Clone the forked repo to your computer

  3. Add your script to the scripts folder (Please follow the naming convention earlier stated - {username-HNG-ID.ext” ---- ( where “.ext” is your file extension .js/.py/.php ) So for example, mine will be tomiwaajayi-HNG-00020.js / tomiwaajayi-HNG-00020.php / tomiwaajayi-HNG-00020.py, all depending on my script extension}

  4. After you have added your script file to the scripts folder, run the following in gitbash or teminal
    • git checkout -b HNG-ID (e.g git checkout -b HNG-00020)
    • git add .
    • git commit -m "username-HNG-ID script" (e.g git commit -m "tomiwaajayi-HNG-00020 script")
    • git push origin HNG-ID (e.g git push origin HNG-00020)

  5. Create a pull request straight to this repository
    NB: In your forked repo, don't merge your newly created branch into develop i.e you will be creating a PR with your new branch (which contains your script) ahead of your develop branch

Languages Supported

  • Python (3.x)
  • Javascript (Node)
  • PHP

JSON Response

Implementation for unsupported and supported languages was catered for and can be accessed with

  • valid
  • invalid

Indexing the valid key gives an array of all supported langugaes that has gone through processing and Indexing the invalid part of the json gives an array of all unsupported languages

sample json output

{
  "valid": [{
    "output": "Hello World, this is Don Joe with HNGi7 ID HNG-xxxx using JavaScript for stage 2 task",
    "name": "Don Joe",
    "id": "HNG-xxxx",
    "email": "don.joe@example.com",
    "language": "Javascript",
    "status": "pass",
  },
  {
    "output": "Hello World, thisis Mary Joe with HNGi7 ID HNG-yyyy using PHP for stage 2 task",
    "name": "Mary Joe",
    "id": "HNG-yyyy",
    "email": "mary.joe@example.com",
    "language": "PHP",
    "status": "fail",
  },
  .
  .
  .],
  "invalid": [{
    "output": "Files with .cpp extension are not supported!",
    "name": "null",
    "file": "intern.cpp"
    "id": "null",
    "email": "null",
    "language": "null",
    "status": "fail",
  }]
}

=======

master

About

HNGi7 Task 2 (By: Team-Fierce)


Languages

Language:JavaScript 55.4%Language:PHP 28.1%Language:Python 16.5%