nickaranz / slackapi-angularjs Goto Github PK
View Code? Open in Web Editor NEWAngularJS module wrapper for the Slack Web API
License: MIT License
AngularJS module wrapper for the Slack Web API
License: MIT License
Would be great to add Grunt or Gulp to this project to let us perform tasks like:
I don't understand the basic setup from the documentation :/
Where do I configure the token?
Do u hav a project maybe where u use this service?
I will glady write a better documentation if I could get this to work :)
Any chance you could add this to bower?
Thanks,
Cathal.
Hi,
I was watching in your code to check if it was possible to be informed when the slack api answer with an error, but it's not possible
function executeGetRequest(url, callback) {
$http.get(url).
success(function (result) {
if (callback)
callback(result);
}).
error(function (data, status) {
$log.log(status);
$log.log(data);
});
}
Is it possible to get an error in the callback ?
Exemple :
function executeGetRequest(url, callback) {
$http.get(url).
success(function (result) {
if (callback)
callback(result);
}).
error(function (data, status) {
if (callback)
callback(null, status);
$log.log(status);
$log.log(data);
});
}
Or something like that ?
Thanks in advance
I am a little confused on the documentation.
Currently, I have:
` var config = {
client_id: 'xxxxxx.xxxx',
client_secret: 'zzzzzzzz',
redirect_uri: 'http://localhost:8010',
authParams : {
client_id: 'xxxxxxxx.xxxx',
scope: 'channels:write',
redirect_uri: 'http://localhost:8010',
team: 'teamname',
}
}
slackSvc.authorize(config.client_id, config.authParams, function (response) {
console.log(resposne)
});
slackSvc.oauth.access(config.client_id, config.client_secret, code, function (response) {
console.log(response)
if(response.ok){
//optional : preload you token for further requests
slackSvc.InitToken(response.access_token);
}
});
`
After doing this, it does prompt me with the Slack list of groups and the Authorize Button, but once I click that, I am brought to my callback uri for a brief second, then back to the Slack Auth page.
Any ideas?
I noticed that in both build versions of the application when you call slackSvc.chat.postMessage it is not calling the correct API method. It calls a method that will return channel info. I've corrected it in both versions and will submit a pull request, but just wanted to open an issue for tracking purposes.
// CHAT
function postMessage(channeId, message, callback, token) {
var params = {
token: token || slackConfig.DefaultToken,
channel: channeId,
text: message
};
executeApiCall("channels.info", params, callback);
}
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.