CognosExt / jcognos

Library to make working with the Cognos API easier
GNU General Public License v3.0
12 stars 1 forks source link

SAmple Code #3

Closed xumes closed 6 years ago

xumes commented 6 years ago

Hello,

Do you have any sample code? I am trying to connect to my Cognos server but I did not understood the parameters I need to pass.

Any help is appreciated.

Thanks in advance, Reginaldo Santos

xumes commented 6 years ago

Here is the code I have developed so far.

const jCognos = require('jcognos')

const url = 'https://zcogwass1.boulder.ibm.com/transform/cognitive/bi'

jCognos.getCognos(url)
    .then(res => {console.log('ready for login', res)})
    .catch(e => {console.log('error: ', e)})

and here, the error on console:

reginaldos-mbp:cognos reginaldosantos$ node cogplug.js 
error:  XMLHttpRequest is not defined
batje commented 6 years ago

Your code is correct, my rollup config was wrong. Fixed this in a new release. npm update should fix this for you.

batje commented 6 years ago

Hi Xumes, did that work for you? Just curious.

xumes commented 6 years ago

Hi, I am using another library, will try again using yours and I'll let you know if it is working now.