Git Product home page Git Product logo

domo-node-sdk's People

Contributors

blairscottsdi avatar brandontysonmoss avatar checketts avatar walexnelson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

domo-node-sdk's Issues

Constants mismatch in Transport.js

I'm getting the following error when attempting to call .datasets.list:

{ Error: Unable to GET /v1/datasets for Dataset at RequestException (/Users/sethstradling/Documents/Development/cerberus/node_modules/domo-sdk/dist/common/Errors.js:5:9) at request.catch (/Users/sethstradling/Documents/Development/cerberus/node_modules/domo-sdk/dist/common/Transport.js:20:24) at process._tickCallback (internal/process/next_tick.js:109:7) method: 'GET', type: 'Dataset', path: '/v1/datasets', error: TypeError: Constants_1.API_SCOPE[s].toLowerCase is not a function at scope.scopes.map.s (/Users/sethstradling/Documents/Development/cerberus/node_modules/domo-sdk/dist/common/Transport.js:76:46) at Array.map (native) at Transport.renewAccessToken (/Users/sethstradling/Documents/Development/cerberus/node_modules/domo-sdk/dist/common/Transport.js:72:14) at Transport.retryRequest (/Users/sethstradling/Documents/Development/cerberus/node_modules/domo-sdk/dist/common/Transport.js:105:25) at rp.catch.err (/Users/sethstradling/Documents/Development/cerberus/node_modules/domo-sdk/dist/common/Transport.js:101:32) at process._tickCallback (internal/process/next_tick.js:109:7) }

It appears that when Transport.js is processing/mapping scopes, the generated constants.API_SCOPE looks like:
{ '0': 'USER', '1': 'DATA', USER: 0, DATA: 1 } ,
and since I'm passing 'USER', the function is attempting to pass 0 to .toLowerCase().

Not sure why API_SCOPE is getting interpreted that way.

Unauthorized request returns 401 inconsistently

The transport client will intercept any response and retry any request that failed for a 401. This is meant to catch requests where the oauth token has expired, refresh the token, and then resend the original request.

Looks like sometimes the API will return a 406 if the token wasn't been set. Needs more investigation.

Bad Request response in get-datasets

domo.datasets.get(datasetId)
.then(res => { console.log(\nDataset: ${res.id} - ${res.name}); })
.catch(console.error);

The method above seems to have a bug. I am trying to get data from domo with the right credentials.
I am able to get this data successfully in Postman by using the url:
https://api.domo.com/v1/datasets/{DATASET_ID}/data
with the right authentication as well

However when I use the method above, I get the error which I've summarized as follows:
{
"status": 400,
"statusReason": "Bad Request",
"message": "Infrastructure problem (403): Access is denied",
"toe": "DV3ET85U1V-GQ837-V5TN9"
}
I am sure this is because in your sdk you do not concated "data" to the url i.e.
https://api.domo.com/v1/datasets/{DATASET_ID}/
I tried it postman and got the same error the method throws.

I've tried to manually add the "/data" to the url in the sdk but it still does not work.
Thanks

The datasets.importData() function doesn't support APPEND

When importing data using domo.dataset.importData() I end up overwriting the contents of my dataset rather than appending to it as I would prefer. This documentation suggests that the ?updateMethod query parameter should be set to APPEND for the underlying API request. Please consider adding a parameter to importData() to select the append semantic, or perhaps add a function like domo.datasets.appendData() that may be used instead of importData() when appending is desired.

Creating stream execution with invalid credentials causes infinite loop

The following code produces an infinite loop:

const domo = require('domo-sdk');
const domoClient = new domo.DomoClient('foo', 'bar');
domoClient.streams.createExecution('19').then((res) => {
        // Never gets here
        done();
      }).catch((err) => {
        // Never gets here either
        done(err);
      });

The logs will print the following:
GET: https://api.domo.com/oauth/token
OAuth token has likely expired. Renewing and attempting again
Renewing access token for scopes: "user data"

signature changed for domo.streams.create

Hello all,
thanks for the great library.
I've notived since v2.0 the signature for domo.streams.create has change from:
domo.streams.create(dataset, updatemethod)
to one parameter:
domo.streams.create({dataSet: dataset, updateMethod: 'REPLACE'})

just a heads up if anyone else runs into this.

regards
Simon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.