def toggle_reblog(self): """Reblog or unreblog selected status.""" status = self.get_selected_status() assert status app, user = self.app, self.user if not app or not user: self.footer.draw_message("You must be logged in to reblog", Color.RED) return status_id = status['id'] if status['reblogged']: status['reblogged'] = False self.footer.draw_message("Unboosting status...", Color.YELLOW) api.unreblog(app, user, status_id) self.footer.draw_message("✓ Status unboosted", Color.GREEN) else: status['reblogged'] = True self.footer.draw_message("Boosting status...", Color.YELLOW) api.reblog(app, user, status_id) self.footer.draw_message("✓ Status boosted", Color.GREEN) self.right.draw(status)
def unreblog(app, user, args): api.unreblog(app, user, args.status_id) print_out("<green>✓ Status unreblogged</green>")
def _unreblog(): logger.info("Unreblogging {}".format(status)) api.unreblog(self.app, self.user, status.id)