charltoons / hipchatter Goto Github PK
View Code? Open in Web Editor NEWNode.js wrapper for the HipChat API (v2)
License: GNU General Public License v2.0
Node.js wrapper for the HipChat API (v2)
License: GNU General Public License v2.0
Line 405 in 1ba1dcc
This code is fixing request option, and this library is using needle.
needle is fixing default request option. So user can't use environment argument to set proxy.
Thereby, user can't access hipchat api through proxy.
The HipChat API appears to have changed slightly - the /v2/room/ endpoint used to return the message "Room not found", but now returns "Room not found".
Using a regex match instead of == will permit that to be identified as nonexistant
#25
is there a way to add a user to a room ? I wasn't able to find it. is it a limitation of the wrapper or a limitation (by design) of hipchat v2 API ?
regards,
The latest version on NPM doesn't seem to have the create_user function and others. Can you please update NPM so we can deploy successfully :)
Hello!
Can't wait to try out the v2 api!
Would it be possible to include a method for pulling down the current system status reported on http://status.hipchat.com/ ?
We have a vendor/dependency dashboard that shows statuses of API states (Github, PagerDuty, RubyGems, etc..) and would love to see a current status for the HipChat API since we depend on it for lots of notifications.
Thank you!
Chris
As per the v2 API. When you cann 'https://www.hipchat.com/docs/apiv2/method/get_all_rooms', by default it limits the room list to 100. We have over 300 rooms, and so our list is getting truncated. The API supports sending in the GET param of 'max-results' to fetch more. Maybe this could be an param, or allow for pagination?.
There are a few useful changes missing from the published version.
Thanks!
the version of needle this uses is quite old and causes a problem with pre-node 4.
/Users/blimmer/code/oss/ember-cli-deploy-hipchat/node_modules/hipchatter/node_modules/needle/node_modules/qs/lib/index.js:5
const Stringify = require('./stringify');
^^^^^
Use of const in strict mode.
/Users/blimmer/code/oss/ember-cli-deploy-hipchat/node_modules/hipchatter/node_modules/needle/node_modules/qs/lib/index.js:5
const Stringify = require('./stringify');
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
I worked around this by pegging qs to a lower version (^5.2.0
), but this might cause other folks problems too.
Hello,
thanks for this library :-)
Through the doc (and HipChat API doc), I cannot find a way to understand how to join a room/send a message.
I'd like to have a bot which joins a room and can respond to user public messages.
Even through the webhook mechanism I don't see how my user/bot would be part of the list of the room members.
Thanks!
Hiya. First up thanks for writing this package!
Not sure if you've seen but if you have a self signed root CA hipchatter silently fails with v2 api requests. I turned on debug=true and get an error back from openssl saying [self signed cert in chain]. Not sure if you've encountered the same issue on your hipchat beta instance but I'm 99% this is because atlassian don't allow you to add your own CA's to /usr/share/ca-certificates on the HipChat server.
Maybe until Atlassian deploy a fix is there a way to disable strict checking of the certificates? (at least so I can play around with the hipchat API!)
Hi,
I am using hipchatter api and trying to hit room list but getting this error
Invalid OAuth session
Please guide me what is wrong with my implementation.
var authKey = "5127be0d2b4e119058ade9251ada5b";
var notifyKey = "83iYDzb1I8U4CZfTtDO058hH08w9zHq8ZRC6wsmh";
var hipchatter = new Hipchatter(authKey);
// this will list all of your rooms
hipchatter.rooms(function(err, rooms) {
if (!err) {
console.log(rooms)
}else{
console.log(err);
}
});
Why does this library constantly post cat photos to my rooms?
I don't like cats that much. Can it only post a photo once per day?
Would be nice if you had everything return promises.
Hello! I would like to add emoticons to this project. I've forked it and started working on an emoticons function that I wanted to run by you.
hipchatter.emoticons(params, callback);
When retrieving a specific emoticon
hipchatter.emoticons(34, function(err, results){} );
or
hipchatter.emoticons('fonzie', function(err, results){} );
When retrieving all emoticons
You could pass in an optional object that will set the query string parameters. Below is an object with the default query string params.
hipchatter.emoticons({start_index: 0, max_results: 100, type: 'all'}, function(err, results){} );
Or you could just leave it blank to get all emoticons with the default params (meaning the first 100).
hipchatter.emoticons(function(err, results){} );
However...
Elsewhere in the API, you use different functions to retrieve an array of objects vs. that specific object, like hipchatter.webhooks()
vs. hipchatter.get_webhook()`. So instead, this could be:
hipchatter.emoticons(params, callback); // params optional
hipchatter.get_emoticon(id, callback); // id required
Thoughts on which one makes more sense? Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.