mastools

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2023 License: Unlicense Imports: 1 Imported by: 0

README

mastools

A bunch of tools

Go Reference

See https://docs.joinmastodon.org/methods/admin/trends/ There are three trend types:

  • Links
  • Statuses
  • Tags

To see how it works look at the out from git grep "manage_taxonomies" and git grep "Admin::Trends".

NOTE: I personally disable links on servers I admin. There is too much risk from a bad/malicious link.

Handling Permissions

It's never a good idea to have a lot of credentials floating around with broad permissions. To set this up soundly:

  • Create a "Trend Editor" role that can ONLY "Manage Taxonomies"
  • Create a service account and grant it that role
  • Login to this account, setup 2FA, etc.
  • Create a new application on the service account
    • Revoke all permissions except "admin:write". Unfortunately Mastodon doesn't have a fine grained permission for "admin:trends".
  • Copy the access token into a secret manager.
  • Pass the token to this application when calling methods

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
mastodon
The api package contains http json bindings for Mastodon
The api package contains http json bindings for Mastodon
Converters create mappings from one type to the next.
Converters create mappings from one type to the next.
webhooks
Webhooks provide json format converters that are useful for webhooks
Webhooks provide json format converters that are useful for webhooks
gcp
secrets
Secrets is for interaction with the GCP secrets manager
Secrets is for interaction with the GCP secrets manager

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL