netromdk / slacker

Slacker - Easy access to the Slack API and admin of workspaces/teams.
MIT License
14 stars 0 forks source link

Create and remove workspaces #68

Closed netromdk closed 6 years ago

netromdk commented 6 years ago

Depends on #67 to be merged first so master can be rebased onto this one.

Fixes #64.

Changes proposed in this pull request:

netromdk commented 6 years ago

Had an idea: By checking a token with auth.test it returns a response like this:

2018-02-06 20:44:11,061 - AuthTestCommand - DEBUG - URL: https://SPACE.slack.com/
2018-02-06 20:44:11,061 - AuthTestCommand - DEBUG - Workspace: SPACE
2018-02-06 20:44:11,061 - AuthTestCommand - DEBUG - Workspace ID: SPACE_ID
2018-02-06 20:44:11,061 - AuthTestCommand - DEBUG - User: USER
2018-02-06 20:44:11,061 - AuthTestCommand - DEBUG - User ID: USER_ID

So why don't we change it so that adding a new workspace only requires inputting a token, then we simply grab the name of the workspace on successful authentication instead. Small thing but I like to make things simple as can be.