twitter

package
v0.0.0-...-c9b6943 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Overview

Package twitter holds utilities for bootstrapping a Twitter API client from the metadata injected by the TwitterBinding. Within a process running in the context of a TwitterBinding, users can write:

client, err := twitter.New(ctx)

to get a client authorized with the access token from the TwitterBinding.

Index

Constants

View Source
const (
	VolumeName = "twitter-binding"
	MountPath  = bindings.MountPath + "/twitter" // filepath.Join isn't const.
)

Variables

This section is empty.

Functions

func NewAppClient

func NewAppClient(ctx context.Context) (*twitter.Client, error)

NewAppClient instantiates a new twitter client that authenticates with the application credentials.

func NewUserClient

func NewUserClient(ctx context.Context) (*twitter.Client, error)

NewUserClient instantiates a new twitter client that authenticates with a particular user access token and secret in addition to the application credentials.

func ReadKey

func ReadKey(key string) (string, error)

ReadKey may be used to read keys from the secret bound by the TwitterBinding.

Types

This section is empty.

Jump to

Keyboard shortcuts

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