Skip to content

Add VideoNote - #625

Merged
tsnoam merged 11 commits into
masterfrom
videonote
May 26, 2017
Merged

Add VideoNote#625
tsnoam merged 11 commits into
masterfrom
videonote

Conversation

@jsmnbom

@jsmnbom jsmnbom commented May 20, 2017

Copy link
Copy Markdown
Member

refs #617
This is where it gets weird....
According to telegram length is Video width and height.. but how that works with one parameter I couldn't tell you.. it also seems to be required but is not marked as such in the documentation....

@jsmnbom
jsmnbom changed the base branch from master to beta May 21, 2017 12:45
@jsmnbom
jsmnbom changed the base branch from beta to master May 21, 2017 13:41

@tsnoam tsnoam left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments on code.

Comment thread telegram/bot.py
long. Use this method to send video messages

Args:
chat_id (int|str): Unique identifier for the message recipient - Chat id.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/voice/vide_note/
type: InputFile|str

Comment thread telegram/bot.py
url = '{0}/sendVideoNote'.format(self.base_url)

data = {'chat_id': chat_id, 'video_note': video_note}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if duration is not None
(and same for length below)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure? We don't do that anywhere else in bot.py?

Comment thread telegram/inputfile.py Outdated
self.input_file = data.pop('certificate')
elif 'video_note' in data:
self.input_name = 'video_note'
self.input_file = data.pop('video_note')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder - we have a lot of branching here. Should we move to a dict here? It's much more pythonic.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what you meant.. does this work?

Comment thread telegram/inputfile.py Outdated
])

# Add input_file to upload
# Add input_file to upload

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please return the leading indentation

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, danm yapf

Comment thread telegram/message.py Outdated
sticker=None,
video=None,
voice=None,
video_note=None,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same note like I left on #628 - should new parameters be added in the middle or in the end of the function?

@tsnoam
tsnoam merged commit ae33d33 into master May 26, 2017
@jsmnbom
jsmnbom deleted the videonote branch June 18, 2017 10:43
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants