Documentation ¶
Index ¶
- type Bot
- func (b *Bot) DoRegistrationAndSubscribeBusiness() error
- func (b *Bot) HandleCRCResponse(w http.ResponseWriter, r *http.Request)
- func (b *Bot) TwitterClient() *twitter.Client
- func (b *Bot) TwitterConfig() *BotConfig
- func (b *Bot) TwitterV2Client() *twitterv2.Client
- func (b *Bot) WebhookPath() string
- type BotConfig
- type NotFoundError
- type Tokens
- type WebhookConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
Bot is a twitter bot
func NewBotFromFile ¶
func (*Bot) DoRegistrationAndSubscribeBusiness ¶
DoRegistrationAndSubscribeBusiness registers the webhook for twitter bot
func (*Bot) HandleCRCResponse ¶
func (b *Bot) HandleCRCResponse(w http.ResponseWriter, r *http.Request)
HandleCRCResponse handles the crc response
func (*Bot) TwitterClient ¶
func (*Bot) TwitterConfig ¶
func (*Bot) TwitterV2Client ¶ added in v0.0.3
func (*Bot) WebhookPath ¶
type BotConfig ¶
type BotConfig struct { Tokens Tokens `json:"tokens"` Environment string `json:"environment"` WebhookHost string `json:"webhook-host"` WebhookPath string `json:"webhook-path"` OverrideRegistration bool `json:"override-registration"` }
BotConfig is config for initializing new twitter bot
type NotFoundError ¶
type NotFoundError struct {
Msg string
}
NotFoundError not found error
func (NotFoundError) Error ¶
func (n NotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.