media

package
v0.0.0-...-af574e6 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Media

type Media struct {
	MediaID          int64  `json:"media_id"`
	MediaIDString    string `json:"media_id_string"`
	ExpiresAfterSecs uint64 `json:"expires_after_secs"`
}

Media ... response of uploaded file

type Service

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

Service ... provides methods for accessing Twitter status API endpoints.

func NewService

func NewService(httpClient *http.Client) *Service

NewStatusService returns a new StatusService.

func (*Service) Upload

func (s *Service) Upload(params *UploadParams) (*Media, *http.Response, error)

Upload media file Requires a user auth context. https://dev.twitter.com/rest/reference/post/media/upload

type UploadParams

type UploadParams struct {
	File     []byte
	MimeType string
}

UploadParams ... are the parameters for StatusService.Update

Jump to

Keyboard shortcuts

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