twitter

package
v0.0.0-...-0a55d2d Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle(text string) ([]telego.InputMedia, []string)

Types

type Core

type Core struct {
	UserResults struct {
		Result struct {
			Legacy Legacy `json:"legacy"`
		} `json:"result"`
	} `json:"user_results"`
}

type FxTwitterAPIData

type FxTwitterAPIData struct {
	Code  int            `json:"code"`
	Tweet FxTwitterTweet `json:"tweet"`
}

type FxTwitterAuthor

type FxTwitterAuthor struct {
	Name       string `json:"name"`
	ScreenName string `json:"screen_name"`
}

type FxTwitterMedia

type FxTwitterMedia struct {
	URL          string `json:"url"`
	ThumbnailURL string `json:"thumbnail_url"`
	Width        int    `json:"width"`
	Height       int    `json:"height"`
	Type         string `json:"type"`
}

type FxTwitterTweet

type FxTwitterTweet struct {
	Text   string          `json:"text"`
	Author FxTwitterAuthor `json:"author"`
	Media  struct {
		All []FxTwitterMedia `json:"all"`
	} `json:"media"`
}

type InputMedia

type InputMedia struct {
	File      *os.File
	Thumbnail *os.File
}

type Legacy

type Legacy *struct {
	FullText         string `json:"full_text"`
	ExtendedEntities struct {
		Media []Media `json:"media"`
	} `json:"extended_entities"`
	Name       string `json:"name"`
	ScreenName string `json:"screen_name"`
	Entities   struct {
		Description struct {
			Urls []interface{} `json:"urls"`
		} `json:"description"`
	} `json:"entities"`
}

type Media

type Media struct {
	DisplayURL           string `json:"display_url"`
	ExpandedURL          string `json:"expanded_url"`
	MediaURLHTTPS        string `json:"media_url_https"`
	Type                 string `json:"type"`
	URL                  string `json:"url"`
	ExtMediaAvailability struct {
		Status string `json:"status"`
	} `json:"ext_media_availability"`
	OriginalInfo struct {
		Height int `json:"height"`
		Width  int `json:"width"`
	} `json:"original_info"`
	VideoInfo struct {
		Variants []struct {
			Bitrate     int    `json:"bitrate,omitempty"`
			ContentType string `json:"content_type"`
			URL         string `json:"url"`
		} `json:"variants"`
	} `json:"video_info"`
}

type Result

type Result struct {
	Typename string  `json:"__typename"`
	Reason   *string `json:"reason"`
	Tweet    struct {
		Legacy Legacy `json:"legacy"`
	} `json:"tweet"`
	Core   Core   `json:"core"`
	Legacy Legacy `json:"legacy"`
}

type Size

type Size struct {
	H      int    `json:"h"`
	W      int    `json:"w"`
	Resize string `json:"resize"`
}

type TwitterAPIData

type TwitterAPIData *struct {
	Data struct {
		TweetResult *struct {
			Result `json:"result"`
		} `json:"tweetResult"`
	} `json:"data"`
}

Jump to

Keyboard shortcuts

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