Giter Club home page Giter Club logo

Comments (6)

avbel avatar avbel commented on September 3, 2024

I have tested.

    var catapult = require("node-bandwidth");
    catapult.Client.globalOptions.userId = "u-xxxxx";
    catapult.Client.globalOptions.apiToken = "t-xxxxx";
    catapult.Client.globalOptions.apiSecret = "xxxxxx";
    catapult.Message.create( {to: "+12520000000", from: "+1910000000", text: "test"}, function(err, message){
      if(err){
        return console.error("Error: %s", err);
      }
      console.log(message);
    });

And

    var catapult = require("node-bandwidth");
        var client = new catapult.Client("u-xxxxx", "t-xxxxx", "xxxxx");
    catapult.Message.create(client,  {to: "+12520000000", from: "+1910000000", text: "test"}, function(err, message){
      if(err){
        return console.error("Error: %s", err);
      }
      console.log(message);
    });

Both pieces of code work fine.

node-bandwidth is 1.0.8, node is 0.12.0. Tested on Mac OS X 10.10.3 and Debian Linux 8

from node-bandwidth.

wtcross avatar wtcross commented on September 3, 2024

Could you try it again with node 0.10.x? It isn't working for me either. I
see the Travis build uses 0.10, but there might be something odd going on.
I'll put a stack trace in the issue with my node and client versions too
within a couple of hours.
On May 6, 2015 2:30 AM, "avbel" [email protected] wrote:

I have tested.

var catapult = require("node-bandwidth");
catapult.Client.globalOptions.userId = "u-xxxxx";
catapult.Client.globalOptions.apiToken = "t-xxxxx";
catapult.Client.globalOptions.apiSecret = "xxxxxx";
catapult.Message.create( {to: "+12520000000", from: "+1910000000", text: "test"}, function(err, message){
if(err){
return console.error("Error: %s", err);
}
console.log(message);
});

And

var catapult = require("node-bandwidth");
var client = new catapult.Client("u-xxxxx", "t-xxxxx", "xxxxx");
catapult.Message.create(client, {to: "+12520000000", from: "+1910000000", text: "test"}, function(err, message){
if(err){
return console.error("Error: %s", err);
}
console.log(message);
});

Both pieces of code work fine.

node-bandwidth is 1.0.8, node is 0.12.0. Tested on Mac OS X 10.10.3 and
Debian Linux 8

β€”
Reply to this email directly or view it on GitHub
#8 (comment)
.

from node-bandwidth.

avbel avatar avbel commented on September 3, 2024

Node 0.10.38. Same result

from node-bandwidth.

wtcross avatar wtcross commented on September 3, 2024

Here is a globally configured client example. It works.

Here is a non-globally configured client example. It also works.

I'm using node v0.10.38 on Ubuntu 15.04. Thanks for the thoroughness in checking out @avbel !

from node-bandwidth.

wtcross avatar wtcross commented on September 3, 2024

I was basing my previous comment off memory.

from node-bandwidth.

nguyer avatar nguyer commented on September 3, 2024

Okay, this actually is working for me now. I'm not sure what was different when it didn't work before. Thanks guys!

from node-bandwidth.

Related Issues (20)

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.