Closed juanpabloaj closed 9 years ago
for run tests
python setup.py test
or with nosetest
nosetest
other option is add the function like a method in Channels
class.
Thanks for this, @juanpabloaj. When I was implementing slacker, I just wanted to make it as close as possible to the original API, so it's passing exactly the same parameters, with the same order.
Unfortunately, Slack API is not very consistent with the use of channel name/ID. When some APIs are passing channel name as a channel parameter, the others are passing channel ID.
A function like this could be useful, but I would go with the second option, get_channel_id method on Channels class. If you could make those changes, I would be happy to merge it into master.
@os ok, now get_channel_id
is a method of channels class.
Thanks @juanpabloaj. tests/init.py was missing, but I just fixed it so it's all good.
Some slack API methods need the channel id, not the channel name, like
files.upload
.Channel id ('C02GXXYZ') is different to the channel name ('test').
Example: