mirror of
https://github.com/idanoo/go-mastodon-stats
synced 2025-07-01 22:02:20 +00:00
Test mastodon
This commit is contained in:
parent
dcbef8eb1f
commit
a54362231b
2 changed files with 6 additions and 6 deletions
|
@ -13,8 +13,8 @@ func Run() {
|
|||
|
||||
// Write to DB
|
||||
updatedMetrics := persistMetrics(metrics)
|
||||
|
||||
sendToMatrix(updatedMetrics)
|
||||
|
||||
postToMastodon(updatedMetrics)
|
||||
if len(updatedMetrics) > 0 {
|
||||
// sendToMatrix(updatedMetrics)
|
||||
postToMastodon(updatedMetrics)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,8 +16,8 @@ func postToMastodon(metrics []metric) {
|
|||
|
||||
c := mastodon.NewClient(&mastodon.Config{
|
||||
Server: fmt.Sprintf("https://%s", MASTODON_INSTANCE_URL),
|
||||
ClientID: "client-id",
|
||||
ClientSecret: "client-secret",
|
||||
ClientID: "go-mastodon-stats",
|
||||
ClientSecret: "randomgeneratedstringthatimnotsureisneeded",
|
||||
})
|
||||
err := c.Authenticate(context.Background(), MASTODON_USERNAME, MASTODON_PASSWORD)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue