Skip to content

Commit

Permalink
[rostwitter] Remove _check_and_split_word function
Browse files Browse the repository at this point in the history
  • Loading branch information
iory authored and knorth55 committed Aug 18, 2022
1 parent 3df5220 commit 594a442
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions rostwitter/python/rostwitter/twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,6 @@ def _request_url(self, url, verb, data=None):
)
return 0 # if not a POST or GET request

def _check_and_split_word(self, text):
"""Check tweet text length and split it.
See https://developer.twitter.com/en/docs/counting-characters
"""
c = count_tweet_text(text)
if c > 280:
rospy.logwarn('tweet is too longer > 280 characters.')
texts = split_tweet_text(text)
if len(texts) > 0:
text = texts[0]
else:
text = ''
return text

def _post_update_with_reply(self, texts, in_reply_to_status_id=None):
for text in texts:
url = 'https://api.twitter.com/1.1/statuses/update.json'
Expand Down

0 comments on commit 594a442

Please sign in to comment.