https://github.com/alistairjlh/slackapiwrapperforpowershell
Execute commands against your Slack environment. See https://api.slack.com/methods for more information.
https://github.com/alistairjlh/slackapiwrapperforpowershell
slack slack-api slack-bot
Last synced: 5 months ago
JSON representation
Execute commands against your Slack environment. See https://api.slack.com/methods for more information.
- Host: GitHub
- URL: https://github.com/alistairjlh/slackapiwrapperforpowershell
- Owner: alistairjlh
- License: gpl-3.0
- Created: 2024-06-10T03:22:28.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-10T03:47:56.000Z (about 2 years ago)
- Last Synced: 2025-02-07T09:41:50.630Z (over 1 year ago)
- Topics: slack, slack-api, slack-bot
- Language: PowerShell
- Homepage:
- Size: 17.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Slack API Wrapper For Powershell
## Simple Post Message Example
```
$token = Read-Host "Token"
$channel = Read-Host "Channel"
$messageText = "*Date:* $((Get-Date).ToString())`n*Message* Lorem ipsum dolor sit amet "
[SlackAPIWrapper]$slack= [SlackAPIWrapper]::new($token)
$query = [SlackAPIWrapper]::NewQuery()
$query.Add('channel', $channel)
$query.Add('text', $message)
$messageResponse = $slack.SendCommand("chat.postMessage", $query)
```
## Manually Setting Limiter Rate for Specific Command
```
$token = 'xoxb-XXXXX'
[SlackAPIWrapper]$slack= [SlackAPIWrapper]::new($token)
$slack.Limiters.Add("conversations.history", [SlackAPILimiter]::new([SlackRateLimits]::Tier3) )
```