chatjson

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsOverlappingJsonValue

func IsOverlappingJsonValue(value string, values []string) bool

func BufioScannerJsonFile(){} values = 1, 2, 3 value = 2

func ParseFileNameWithoutExt

func ParseFileNameWithoutExt(path string) string

ParseFileNameWithoutExt "dir/dir/file.go" => "file" "dir/file" => "file"

func WriteFileJsonAttendanceRate

func WriteFileJsonAttendanceRate(filename, text string) error

func WriteJsonFile

func WriteJsonFile(obj interface{}, outputFileName string) error

Types

type ChatAttendee

type ChatAttendee struct {
	VideoID    string   `json:"video_id"`
	Authorname []string `json:"authorname"`
}

func FitchUsersName

func FitchUsersName(fileName, videoID string) (*ChatAttendee, error)

type ChatDataJsonInEmoji

type ChatDataJsonInEmoji struct {
	Addchatitemaction struct {
		Item struct {
			Livechattextmessagerenderer struct {
				Message struct {
					Runs []struct {
						Text  string `json:"text,omitempty"`
						Emoji struct {
							Emojiid     string   `json:"emojiId"`
							Shortcuts   []string `json:"shortcuts"`
							Searchterms []string `json:"searchTerms"`
							Image       struct {
								Thumbnails []struct {
									URL    string `json:"url"`
									Width  int    `json:"width"`
									Height int    `json:"height"`
								} `json:"thumbnails"`
								Accessibility struct {
									Accessibilitydata struct {
										Label string `json:"label"`
									} `json:"accessibilityData"`
								} `json:"accessibility"`
							} `json:"image"`
							Iscustomemoji bool `json:"isCustomEmoji"`
						} `json:"emoji,omitempty"`
					} `json:"runs"`
				} `json:"message"`
				Authorname struct {
					Simpletext string `json:"simpleText"`
				} `json:"authorName"`
				Authorphoto struct {
					Thumbnails []struct {
						URL    string `json:"url"`
						Width  int    `json:"width"`
						Height int    `json:"height"`
					} `json:"thumbnails"`
				} `json:"authorPhoto"`
				Contextmenuendpoint struct {
					Commandmetadata struct {
						Webcommandmetadata struct {
							Ignorenavigation bool `json:"ignoreNavigation"`
						} `json:"webCommandMetadata"`
					} `json:"commandMetadata"`
					Livechatitemcontextmenuendpoint struct {
						Params string `json:"params"`
					} `json:"liveChatItemContextMenuEndpoint"`
				} `json:"contextMenuEndpoint"`
				ID            string `json:"id"`
				Timestampusec string `json:"timestampUsec"`
				Authorbadges  []struct {
					Livechatauthorbadgerenderer struct {
						Customthumbnail struct {
							Thumbnails []struct {
								URL string `json:"url"`
							} `json:"thumbnails"`
						} `json:"customThumbnail"`
						Tooltip       string `json:"tooltip"`
						Accessibility struct {
							Accessibilitydata struct {
								Label string `json:"label"`
							} `json:"accessibilityData"`
						} `json:"accessibility"`
					} `json:"liveChatAuthorBadgeRenderer"`
				} `json:"authorBadges"`
				Authorexternalchannelid  string `json:"authorExternalChannelId"`
				Contextmenuaccessibility struct {
					Accessibilitydata struct {
						Label string `json:"label"`
					} `json:"accessibilityData"`
				} `json:"contextMenuAccessibility"`
				Timestamptext struct {
					Simpletext string `json:"simpleText"`
				} `json:"timestampText"`
			} `json:"liveChatTextMessageRenderer"`
		} `json:"item"`
		Clientid string `json:"clientId"`
	} `json:"addChatItemAction"`
}

type ChatDataJsons

type ChatDataJsons struct {
	ChatDataJsonInEmojis []ChatDataJsonInEmoji
}

func BufioScannerJsonFile

func BufioScannerJsonFile(fileName string) (*ChatDataJsons, error)

Jump to

Keyboard shortcuts

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