mirror of
https://github.com/seigler/slack-cleanup
synced 2025-07-27 01:36:12 +00:00
Slack file cleanup bot
This commit is contained in:
parent
ba5b52464a
commit
bdb7f4b05d
1 changed files with 33 additions and 0 deletions
33
main.go
Normal file
33
main.go
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"log"
|
||||||
|
"net/http"
|
||||||
|
"os"
|
||||||
|
)
|
||||||
|
|
||||||
|
const apiURL string = "https://slack.com/api/"
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
token := os.Getenv("SLACK_API_TOKEN")
|
||||||
|
|
||||||
|
fmt.Println(token)
|
||||||
|
|
||||||
|
response, err := http.Get(apiURL + "files.list?token=" + token)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
defer response.Body.Close()
|
||||||
|
|
||||||
|
fmt.Println(response.Body)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func listFiles() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func deleteFiles() {
|
||||||
|
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue