Add delete function to tools
This commit is contained in:
parent
671dd3b5d9
commit
3fcb87d145
1 changed files with 3 additions and 0 deletions
3
tools.py
3
tools.py
|
@ -44,6 +44,9 @@ class twObject:
|
||||||
self.auth.set_access_token(config.ato, config.ase)
|
self.auth.set_access_token(config.ato, config.ase)
|
||||||
self.api = tweepy.API(self.auth)
|
self.api = tweepy.API(self.auth)
|
||||||
|
|
||||||
|
def delete(self, id):
|
||||||
|
self.api.destroy_status(id)
|
||||||
|
|
||||||
def search(self, query, savepoint = 0):
|
def search(self, query, savepoint = 0):
|
||||||
tweets = list(tweepy.Cursor(self.api.search, q=query, since_id=savepoint).items())
|
tweets = list(tweepy.Cursor(self.api.search, q=query, since_id=savepoint).items())
|
||||||
tweets.reverse()
|
tweets.reverse()
|
||||||
|
|
Loading…
Reference in a new issue