- like and retweet should work from detail view now

workspace
Brendan Howell 7 years ago
parent 2b2d4741ee
commit 66b15017d7

@ -156,7 +156,6 @@ class PublicRelations(Bureau):
"""
shortcode, _ = data.split(".")
tweet_id = self.get_tweet_id(shortcode)
self.log.debug("tweet details for id:" + tweet_id)
tweet = self.t.t.statuses.show(id=tweet_id)
prn = printer.Usb(0x416, 0x5011, in_ep=0x81, out_ep=0x03)
prn.codepage = "cp437"
@ -185,7 +184,9 @@ class PublicRelations(Bureau):
prn.image(im, impl="bitImageColumn")
tw_shortcode = self.short_tweet_id(tweet["id_str"])
prn.textln("retweet")
prn.barcode("PRtwrt." + tw_shortcode, "CODE128", function_type="B")
prn.textln("like")
prn.barcode("PRtwlk." + tw_shortcode, "CODE128", function_type="B")
prn.text("\r\n\r\n")
@ -198,7 +199,6 @@ class PublicRelations(Bureau):
"""
tweet_id = self.get_tweet_id(data)
self.t.t.statuses.retweet(id=tweet_id)
return
@add_command("twre", "Reply to Tweet")
def tw_reply(self, data):
@ -216,7 +216,6 @@ class PublicRelations(Bureau):
"""
tweet_id = self.get_tweet_id(data)
self.t.t.favorites.create(id=tweet_id)
return
def main():

Loading…
Cancel
Save