Skip to content

Commit

Permalink
Merge pull request #4 from justingood/master
Browse files Browse the repository at this point in the history
Support for sending photos, videos, and text files.
  • Loading branch information
efaisal committed Apr 7, 2014
2 parents 2f41512 + 04a986d commit 072c5f6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pytg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ def msg(self, peer, message):
self.tgin.write(' '.join(['msg', peer, message]) + '\n')
self.tgin.flush()

def send_photo(self, peer, path):
self.tgin.write(' '.join(['send_photo', peer, path]) + '\n')
self.tgin.flush()

def send_video(self, peer, path):
self.tgin.write(' '.join(['send_video', peer, path]) + '\n')
self.tgin.flush()

def send_text(self, peer, path):
self.tgin.write(' '.join(['send_text', peer, path]) + '\n')
self.tgin.flush()

def dialog_list(self):
self.tgin.write('dialog_list\n')
self.tgin.flush()
Expand Down

0 comments on commit 072c5f6

Please sign in to comment.