tweeter

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the git reference injected at build
	Version string
)

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client sends tweets to Twitter

func New

func New(cfg Config) (*Client, error)

New creates a new instance of the tweeter.Client ready to send tweets

func (*Client) Tweet

func (c *Client) Tweet(message string) error

Tweet sends a tweet

type Config

type Config struct {
	ApiKey            string
	ApiKeySecret      string
	AccessToken       string
	AccessTokenSecret string
}

Config is the authentication params needed to construct a tweeter.Client

func (Config) Validate

func (cfg Config) Validate() error

Validate will check the Config to ensure its field values are valid

Jump to

Keyboard shortcuts

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