aboutsummaryrefslogtreecommitdiff
path: root/mastodon
diff options
context:
space:
mode:
authorChristine Dodrill <me@christine.website>2019-04-01 10:05:03 -0700
committerChristine Dodrill <me@christine.website>2019-04-01 10:05:28 -0700
commitf06f021f402270951f849dde7bee3f3340b8a1d5 (patch)
treebaee337aab524f162b349d254d21c2d8f2716d44 /mastodon
parentba91a17859267201b1d1f0e71da465b1464d940f (diff)
downloadx-f06f021f402270951f849dde7bee3f3340b8a1d5.tar.xz
x-f06f021f402270951f849dde7bee3f3340b8a1d5.zip
reorg
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/mkapp/main.go37
1 files changed, 0 insertions, 37 deletions
diff --git a/mastodon/mkapp/main.go b/mastodon/mkapp/main.go
deleted file mode 100644
index 376ce52..0000000
--- a/mastodon/mkapp/main.go
+++ /dev/null
@@ -1,37 +0,0 @@
-package main
-
-import (
- "flag"
- "fmt"
- "log"
-
- "github.com/McKael/madon/v2"
- "github.com/Xe/x/internal"
-)
-
-var (
- instance = flag.String("instance", "", "mastodon instance")
- appName = flag.String("app-name", "Xe/x bot", "app name for mastodon")
- redirectURI = flag.String("redirect-uri", "urn:ietf:wg:oauth:2.0:oob", "redirect URI for app users")
- website = flag.String("website", "https://github.com/Xe/x", "website for users that click the app name")
- username = flag.String("username", "", "username to generate token")
- password = flag.String("password", "", "password to generate token")
-)
-
-var scopes = []string{"read", "write", "follow"}
-
-func main() {
- internal.HandleStartup()
-
- c, err := madon.NewApp(*appName, *website, scopes, *redirectURI, *instance)
- if err != nil {
- log.Fatal(err)
- }
-
- err = c.LoginBasic(*username, *password, scopes)
- if err != nil {
- log.Fatal(err)
- }
-
- fmt.Printf("APP_ID=%s\nAPP_SECRET=%s\nTOKEN=%s\nINSTANCE=%s", c.ID, c.Secret, c.UserToken.AccessToken, *instance)
-}