twitter

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client twitter.Client

Client is an alias for twitter.Client with some additional receiver functions for convenience.

func GetClient

func GetClient(c *Credentials) (*Client, error)

GetClient returns a twitter client given proper credentials.

func (*Client) Tweet

func (c *Client) Tweet(s string) (string, error)

Tweet is a convenience function wrapping the twitter client call to send a tweet.

A successful tweet will return the CreatedAt timestamp.

func (*Client) Verify

func (c *Client) Verify() string

Verify returns user info using the provided credentials to validate they work.

type Credentials

type Credentials struct {
	ConsumerKey    string
	ConsumerSecret string
	AccessToken    string
	AccessSecret   string
}

Credentials stores the secrets/tokens/keys necessary for authentication with the Twitter API.

Jump to

Keyboard shortcuts

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