nl_tokens: ** send user s request to github OR retrieve from cache if possible
pl_tokens: async function getIssues ( <mask> , client , cacheKey ) { let data , dataString , dataJson , status , cachedResponse = null ; if ( cacheKey ) { cachedResponse = await cache . getString ( cacheKey ) ; } if ( cachedResponse !== null ) { status = 200 ; dataString = cachedResponse ; return { dataString , status } ; } else { //get issue details try { data = await client . request ( query ) ; //query github dataString = await JSON . stringify ( data ) ; dataJson = await JSON . parse ( dataString ) ; dataJson = getSentiment ( dataJson ) ; status = 200 ; } catch ( err ) { //remove github status before returning because it seems to return 200 no matter what dataString = await JSON . stringify ( err ) ; dataJson = await JSON . parse ( dataString ) ; delete dataJson . response . status ; status = 500 ; } dataString = await JSON . stringify ( dataJson ) ; if ( cacheKey && ( status !== 500 ) ) { cache . set ( cacheKey , dataString , 172800 ) ; //cache for 2 days (only non-custom requests) } return { dataString , status } ; } }