Git Product home page Git Product logo

nodejitsu-api's People

Contributors

3rd-eden avatar avianflu avatar blakmatrix avatar chjj avatar coderarity avatar cronopio avatar fb55 avatar indexzero avatar jcrugzz avatar jfhbrook avatar julianduque avatar marak avatar mmalecki avatar pksunkara avatar skyisle avatar southern avatar stammen avatar tjanczuk avatar yawnt 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  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  avatar  avatar  avatar

nodejitsu-api's Issues

problem calling nodejitsu apis from behind a proxy

It appears one cannot call nodejitsu APIs from behind a proxy.

I installed jitsu toolset via npm install jitsu -g. After reading nodejitsu/jitsu#106 I configured my proxy server with a call to npm config set proxy http://<myproxyserver>:<myproxyserverport>. Despite that, jitsu signup was unable to connect to the nodejitsu host.

I submitted pull request #1 with a prospective fix.

Publish `[email protected]` to npm

@AvianFlu @jesusabdullah I tagged v0.2.1 in this repository for fc2ddfd, but I didn't publish it to npm because there was inconsistent usage in jitsu:

  # Didn't work, but had correct nodejitsu-api call
  $ jitsu apps update

  # Did work, but only because of the bug in `nodejitsu-api` which I fixed in 0.2.1
  $ jitsu deploy

This is a commit in jitsu which makes it work with [email protected]: nodejitsu/jitsu@040a3b3

Please review that and publish nodejitsu-api and jitsu with compatible version(s).

client.logs.byApp - path does not exist.

Hi,

According to the docs, when I create a client and then run a logs.byApp, as follows:

var nj = require('nodejitsu-api');

var njc = nj.createClient({
  username: 'wildcardlabs',
  password: 'secret',
  remoteUri: 'https://api.nodejitsu.com'
});

njc.logs.byApp('my-app', 50, function (err, data) {
  console.log(err)
  console.log(data);
});

I get an error:

[Error: Invalid options, must provide a logs service host]

Thus, I've looked into the code and found out that there is a return case when I don't supply "logs.host" in the config.

var njc = nj.createClient({
  username: 'wildcardlabs',
  password: 'secret',
  remoteUri: 'https://api.nodejitsu.com',
  logs: {host:"api.nodejitsu.com"}
});

But when I try with this alteration, I get another error telling that the path does not exist:

{ error: { error: 'Could not find path: /logs/wildcardlabs/my-app/50' } }                

Note: Actual app name has been replaced by "my-app"

Am I missing something or doing something wrong?

Allow different timeouts per request.

Currently it's only possible to set a timeout option for the whole client instance and it needs to be really high as deployments and start operation can take various of minutes. But other API calls such as a simple account details call will also be under that same timeout and having a timeout of 8+ minutes will be to damn high for it. As you want to be able to timeout those requests in timely manner.

Suggested API's

// if there are 2 objects in the arguments assume that the last one is options for the request
client.command('username', data, options, callback)

or something signature breaking

client.timeout(5000).command('username', data, callback)

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.