Remove outdated and old comments.

bot-api-6.1
Syfaro 2018-10-08 18:26:50 -05:00
parent 03815bf5bd
commit 655c3a4137
1 changed files with 0 additions and 40 deletions

View File

@ -68,7 +68,6 @@ type BaseChat struct {
DisableNotification bool DisableNotification bool
} }
// params returns Params representation of BaseChat
func (chat *BaseChat) params() (Params, error) { func (chat *BaseChat) params() (Params, error) {
v := make(Params) v := make(Params)
@ -91,7 +90,6 @@ type BaseFile struct {
FileSize int FileSize int
} }
// params returns a Params representation of BaseFile.
func (file BaseFile) params() (Params, error) { func (file BaseFile) params() (Params, error) {
params, err := file.BaseChat.params() params, err := file.BaseChat.params()
@ -101,12 +99,10 @@ func (file BaseFile) params() (Params, error) {
return params, err return params, err
} }
// getFile returns the file.
func (file BaseFile) getFile() interface{} { func (file BaseFile) getFile() interface{} {
return file.File return file.File
} }
// useExistingFile returns if the BaseFile has already been uploaded.
func (file BaseFile) useExistingFile() bool { func (file BaseFile) useExistingFile() bool {
return file.UseExisting return file.UseExisting
} }
@ -143,7 +139,6 @@ type MessageConfig struct {
DisableWebPagePreview bool DisableWebPagePreview bool
} }
// values returns a url.Values representation of MessageConfig.
func (config MessageConfig) params() (Params, error) { func (config MessageConfig) params() (Params, error) {
v, err := config.BaseChat.params() v, err := config.BaseChat.params()
if err != nil { if err != nil {
@ -157,7 +152,6 @@ func (config MessageConfig) params() (Params, error) {
return v, nil return v, nil
} }
// method returns Telegram API method name for sending Message.
func (config MessageConfig) method() string { func (config MessageConfig) method() string {
return "sendMessage" return "sendMessage"
} }
@ -170,7 +164,6 @@ type ForwardConfig struct {
MessageID int // required MessageID int // required
} }
// values returns a url.Values representation of ForwardConfig.
func (config ForwardConfig) params() (Params, error) { func (config ForwardConfig) params() (Params, error) {
v, err := config.BaseChat.params() v, err := config.BaseChat.params()
if err != nil { if err != nil {
@ -183,7 +176,6 @@ func (config ForwardConfig) params() (Params, error) {
return v, nil return v, nil
} }
// method returns Telegram API method name for sending Forward.
func (config ForwardConfig) method() string { func (config ForwardConfig) method() string {
return "forwardMessage" return "forwardMessage"
} }
@ -195,7 +187,6 @@ type PhotoConfig struct {
ParseMode string ParseMode string
} }
// Params returns a map[string]string representation of PhotoConfig.
func (config PhotoConfig) params() (Params, error) { func (config PhotoConfig) params() (Params, error) {
params, err := config.BaseFile.params() params, err := config.BaseFile.params()
@ -206,12 +197,10 @@ func (config PhotoConfig) params() (Params, error) {
return params, err return params, err
} }
// name returns the field name for the Photo.
func (config PhotoConfig) name() string { func (config PhotoConfig) name() string {
return "photo" return "photo"
} }
// method returns Telegram API method name for sending Photo.
func (config PhotoConfig) method() string { func (config PhotoConfig) method() string {
return "sendPhoto" return "sendPhoto"
} }
@ -226,7 +215,6 @@ type AudioConfig struct {
Title string Title string
} }
// values returns a url.Values representation of AudioConfig.
func (config AudioConfig) params() (Params, error) { func (config AudioConfig) params() (Params, error) {
v, err := config.BaseChat.params() v, err := config.BaseChat.params()
if err != nil { if err != nil {
@ -243,12 +231,10 @@ func (config AudioConfig) params() (Params, error) {
return v, nil return v, nil
} }
// name returns the field name for the Audio.
func (config AudioConfig) name() string { func (config AudioConfig) name() string {
return "audio" return "audio"
} }
// method returns Telegram API method name for sending Audio.
func (config AudioConfig) method() string { func (config AudioConfig) method() string {
return "sendAudio" return "sendAudio"
} }
@ -260,7 +246,6 @@ type DocumentConfig struct {
ParseMode string ParseMode string
} }
// params returns a map[string]string representation of DocumentConfig.
func (config DocumentConfig) params() (Params, error) { func (config DocumentConfig) params() (Params, error) {
params, err := config.BaseFile.params() params, err := config.BaseFile.params()
@ -271,12 +256,10 @@ func (config DocumentConfig) params() (Params, error) {
return params, err return params, err
} }
// name returns the field name for the Document.
func (config DocumentConfig) name() string { func (config DocumentConfig) name() string {
return "document" return "document"
} }
// method returns Telegram API method name for sending Document.
func (config DocumentConfig) method() string { func (config DocumentConfig) method() string {
return "sendDocument" return "sendDocument"
} }
@ -286,7 +269,6 @@ type StickerConfig struct {
BaseFile BaseFile
} }
// values returns a url.Values representation of StickerConfig.
func (config StickerConfig) params() (Params, error) { func (config StickerConfig) params() (Params, error) {
v, err := config.BaseChat.params() v, err := config.BaseChat.params()
@ -295,12 +277,10 @@ func (config StickerConfig) params() (Params, error) {
return v, err return v, err
} }
// name returns the field name for the Sticker.
func (config StickerConfig) name() string { func (config StickerConfig) name() string {
return "sticker" return "sticker"
} }
// method returns Telegram API method name for sending Sticker.
func (config StickerConfig) method() string { func (config StickerConfig) method() string {
return "sendSticker" return "sendSticker"
} }
@ -313,7 +293,6 @@ type VideoConfig struct {
ParseMode string ParseMode string
} }
// values returns a url.Values representation of VideoConfig.
func (config VideoConfig) params() (Params, error) { func (config VideoConfig) params() (Params, error) {
v, err := config.BaseChat.params() v, err := config.BaseChat.params()
@ -325,12 +304,10 @@ func (config VideoConfig) params() (Params, error) {
return v, err return v, err
} }
// name returns the field name for the Video.
func (config VideoConfig) name() string { func (config VideoConfig) name() string {
return "video" return "video"
} }
// method returns Telegram API method name for sending Video.
func (config VideoConfig) method() string { func (config VideoConfig) method() string {
return "sendVideo" return "sendVideo"
} }
@ -343,7 +320,6 @@ type AnimationConfig struct {
ParseMode string ParseMode string
} }
// values returns a Params representation of AnimationConfig.
func (config AnimationConfig) params() (Params, error) { func (config AnimationConfig) params() (Params, error) {
v, err := config.BaseChat.params() v, err := config.BaseChat.params()
@ -355,12 +331,10 @@ func (config AnimationConfig) params() (Params, error) {
return v, err return v, err
} }
// name returns the field name for the Animation.
func (config AnimationConfig) name() string { func (config AnimationConfig) name() string {
return "animation" return "animation"
} }
// method returns Telegram API method name for sending Animation.
func (config AnimationConfig) method() string { func (config AnimationConfig) method() string {
return "sendAnimation" return "sendAnimation"
} }
@ -372,7 +346,6 @@ type VideoNoteConfig struct {
Length int Length int
} }
// values returns a url.Values representation of VideoNoteConfig.
func (config VideoNoteConfig) params() (Params, error) { func (config VideoNoteConfig) params() (Params, error) {
v, err := config.BaseChat.params() v, err := config.BaseChat.params()
@ -383,12 +356,10 @@ func (config VideoNoteConfig) params() (Params, error) {
return v, err return v, err
} }
// name returns the field name for the VideoNote.
func (config VideoNoteConfig) name() string { func (config VideoNoteConfig) name() string {
return "video_note" return "video_note"
} }
// method returns Telegram API method name for sending VideoNote.
func (config VideoNoteConfig) method() string { func (config VideoNoteConfig) method() string {
return "sendVideoNote" return "sendVideoNote"
} }
@ -401,7 +372,6 @@ type VoiceConfig struct {
Duration int Duration int
} }
// values returns a url.Values representation of VoiceConfig.
func (config VoiceConfig) params() (Params, error) { func (config VoiceConfig) params() (Params, error) {
v, err := config.BaseChat.params() v, err := config.BaseChat.params()
@ -413,12 +383,10 @@ func (config VoiceConfig) params() (Params, error) {
return v, err return v, err
} }
// name returns the field name for the Voice.
func (config VoiceConfig) name() string { func (config VoiceConfig) name() string {
return "voice" return "voice"
} }
// method returns Telegram API method name for sending Voice.
func (config VoiceConfig) method() string { func (config VoiceConfig) method() string {
return "sendVoice" return "sendVoice"
} }
@ -431,7 +399,6 @@ type LocationConfig struct {
LivePeriod int // optional LivePeriod int // optional
} }
// values returns a url.Values representation of LocationConfig.
func (config LocationConfig) params() (Params, error) { func (config LocationConfig) params() (Params, error) {
v, err := config.BaseChat.params() v, err := config.BaseChat.params()
@ -442,7 +409,6 @@ func (config LocationConfig) params() (Params, error) {
return v, err return v, err
} }
// method returns Telegram API method name for sending Location.
func (config LocationConfig) method() string { func (config LocationConfig) method() string {
return "sendLocation" return "sendLocation"
} }
@ -454,7 +420,6 @@ type EditMessageLiveLocationConfig struct {
Longitude float64 // required Longitude float64 // required
} }
// values returns a url.Values representation of EditMessageLiveLocationConfig.
func (config EditMessageLiveLocationConfig) params() (Params, error) { func (config EditMessageLiveLocationConfig) params() (Params, error) {
v, err := config.BaseEdit.params() v, err := config.BaseEdit.params()
@ -464,7 +429,6 @@ func (config EditMessageLiveLocationConfig) params() (Params, error) {
return v, err return v, err
} }
// method returns Telegram API method name for edit message Live Location.
func (config EditMessageLiveLocationConfig) method() string { func (config EditMessageLiveLocationConfig) method() string {
return "editMessageLiveLocation" return "editMessageLiveLocation"
} }
@ -474,12 +438,10 @@ type StopMessageLiveLocationConfig struct {
BaseEdit BaseEdit
} }
// values returns a url.Values representation of StopMessageLiveLocationConfig.
func (config StopMessageLiveLocationConfig) params() (Params, error) { func (config StopMessageLiveLocationConfig) params() (Params, error) {
return config.BaseEdit.params() return config.BaseEdit.params()
} }
// method returns Telegram API method name for stop message Live Location.
func (config StopMessageLiveLocationConfig) method() string { func (config StopMessageLiveLocationConfig) method() string {
return "stopMessageLiveLocation" return "stopMessageLiveLocation"
} }
@ -617,7 +579,6 @@ type ChatActionConfig struct {
Action string // required Action string // required
} }
// values returns a url.Values representation of ChatActionConfig.
func (config ChatActionConfig) params() (Params, error) { func (config ChatActionConfig) params() (Params, error) {
v, err := config.BaseChat.params() v, err := config.BaseChat.params()
@ -626,7 +587,6 @@ func (config ChatActionConfig) params() (Params, error) {
return v, err return v, err
} }
// method returns Telegram API method name for sending ChatAction.
func (config ChatActionConfig) method() string { func (config ChatActionConfig) method() string {
return "sendChatAction" return "sendChatAction"
} }