//import unirest module for http request
const unirest = require('unirest');


unirest.get("https://andruxnet-random-famous-quotes.p.mashape.com/?cat=famous")
.header("X-Mashape-Key", "HGt1yD5Z3PmshGmhhSr8nxRBo1j0p1ISynQjsn4rD1bJL8y8GP")
.header("Content-Type", "application/x-www-form-urlencoded")
.header("Accept", "application/json")
.end(function (response) {
    //parse the return json string to json object
    let body = JSON.parse(response.body);
    
    if(response.status === 200){
        console.log('Randome Quote: '+ body.quote+' \n');
        console.log('Author: '+ body.author+' \n');
    }else{
        console.log('Error occurred getting quotes');
    }
  
});
@@ -70,18 +70,428 @@
 rest');%0A
-%0A%0A
+const prompt = require('prompt');%0Aconst colors = require('colors/safe');%0A%0A//start the prompt%0Aprompt.start();%0A%0Aconsole.log(colors.yellow(%22Enter the category you wish to get random quotes%5Cn%22));%0Aconsole.log(colors.bgYellow(%22Tips: 'movies' or 'famous' %5Cn%5Cn%22));%0A%0Aprompt.get(%5B%7B%0A    name: 'category',%0A    required: true%0A%7D%5D, (err, result)=%3E%7B%0A    if(result.category === 'movies' %7C%7C result.category === 'famous')%7B%0A        
 unirest.
@@ -557,17 +557,35 @@
 cat=
-famous%22)%0A
+%22+result.category)%0A        
 .hea
@@ -659,16 +659,24 @@
 8y8GP%22)%0A
+        
 .header(
@@ -728,16 +728,24 @@
 coded%22)%0A
+        
 .header(
@@ -774,16 +774,24 @@
 /json%22)%0A
+        
 .end(fun
@@ -809,16 +809,24 @@
 onse) %7B%0A
+        
     //pa
@@ -867,16 +867,24 @@
  object%0A
+        
     let 
@@ -921,17 +921,33 @@
 y);%0A    
-%0A
+        %0A        
     if(r
@@ -971,32 +971,40 @@
 = 200)%7B%0A        
+     
+   
 console.log('Ran
@@ -999,17 +999,31 @@
 ole.log(
-'
+colors.blue('%5Cn
 Randome 
@@ -1030,18 +1030,34 @@
 Quote: '
+)
 + 
+colors.magenta(
 body.quo
@@ -1058,16 +1058,17 @@
 dy.quote
+)
 +' %5Cn');
@@ -1068,32 +1068,40 @@
 ' %5Cn');%0A        
+  
+      
 console.log('Aut
@@ -1096,16 +1096,28 @@
 ole.log(
+colors.cyan(
 'Author:
@@ -1142,21 +1142,38 @@
 %5Cn')
+)
 ;%0A    
-%7Delse%7B%0A
+        %7Delse%7B%0A        
     
@@ -1188,16 +1188,27 @@
 ole.log(
+colors.red(
 'Error o
@@ -1235,18 +1235,27 @@
 es')
+)
 ;%0A
+        
     %7D%0A  
 %0A%7D);
@@ -1254,8 +1254,177 @@
 %7D%0A  
+ 
-%0A%7D);
+ %0A        %7D);%0A    %7Delse%7B%0A        console.log(colors.red(%22%5CnCategory Entered doesn't exist%5Cn%22));%0A        console.log(colors.grey(%22Try 'movies or famous'%22));%0A    %7D%0A    %0A%7D);%0A%0A

add functionality of allowing user to choose category of random quote