nl_tokens: Generates a ticket on Qlik Sense QRS Api . If the targetId is not correct then the ticket will redirect to the hub
pl_tokens: function ( options , params ) { // Create connection to qps var qpsApi = qps ( options ) ; // Returned object var task = new Task ( ) ; // Ticket flow Rx . Observable . from ( qpsApi . ticket . post ( params ) ) . catch ( ( err ) => { if ( err . match ( / ^Specified targetId .* was unknown$ / ) ) { // if there was a problem with the target Id, try to generate another ticket by reseting target Id task . running ( 'warning' , ` ${ params . TargetId } ` ) ; delete params . TargetId ; return Rx . Observable . from ( module . exports . getTicket ( options , params ) ) ; } else { return Rx . Observable . throw ( new Error ( <mask> ) ) ; } } ) . subscribe ( task ) ; if ( returnObservable ) { return task ; } else { return task . toPromise ( extPromise ) ; } }