twitterwrapper

package
v0.0.0-...-cb3cad0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TwitterImage

type TwitterImage struct {
	MediaID          int64  `json:"media_id"`
	MediaIDString    string `json:"media_id_string"`
	MediaKey         string `json:"media_key"`
	Size             int    `json:"size"`
	ExpiresAfterSecs int    `json:"expires_after_secs"`
	Image            struct {
		ImageType string `json:"image_type"`
		W         int    `json:"w"`
		H         int    `json:"h"`
	} `json:"image"`
}

TwitterImage is the struct that represents a default twitter response for media uploading

type TwitterWrapper

type TwitterWrapper struct {
	TwitterClient *twitter.Client
	HTTPClient    *http.Client
}

TwitterWrapper needs two different clients because dghubble's lib is not able to send tweets with pictures

func NewTwitterWrapper

func NewTwitterWrapper() *TwitterWrapper

func (*TwitterWrapper) HandleImagePost

func (t *TwitterWrapper) HandleImagePost(imageURL string) int64

Jump to

Keyboard shortcuts

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