Changeset - a176c4de6bc8
[Not reviewed]
default
0 1 0
Dennis Fink - 7 years ago 2018-02-10 13:59:26
dennis.fink@c3l.lu
Add more possivle tweets
1 file changed with 8 insertions and 0 deletions:
0 comments (0 inline, 0 general)
spaceapi/utils.py
Show inline comments
 
@@ -29,20 +29,25 @@ elif not os.path.isfile(default_json_fil
 
possible_open_tweets = (
 
    'The space is now open!',
 
    'The space is open! Come in and hack something!',
 
    'Yes, we\'re open! Come in and create something!',
 
    'Come by and hack something! We\'ve just opened!',
 
    'The ChaosStuff is now open for everyone!',
 
    'Let the Chaos begin! We\'re open!',
 
    'What do we hack now? Come and see, we\'ve just opened!',
 
    'TUWAT! Come and hack. We are open!',
 
)
 

	
 
possible_closed_tweets = (
 
    'The space is now closed!',
 
    'We\'re closed now! See you soon.',
 
    'Sorry, we are closed now!',
 
    'The ChaosStuff is now closed! Come back another time!',
 
    'Poweroff process finished! We\'re closed!',
 
    'Singularity reached! The space is closed!',
 
    'Dream of electric sheeps! We are closed!',
 
)
 

	
 

	
 
def post_tweet(tweet, spaceapi=None):
 
    if 'TWITTER_CONSUMER_KEY' in current_app.config:
 
        auth = tweepy.OAuthHandler(
 
@@ -183,12 +188,15 @@ class ActiveStatus(Singleton, dict):
 
class ActiveStatusv14(ActiveStatus):
 

	
 
    def __init__(self):
 
        self.default_json_file = default_json_file_v14
 
        self.last_state_file = last_state_file_v14
 

	
 
    def send_tweet(self, value):
 
        pass
 

	
 

	
 
def request_wants_json():
 
    best = request.accept_mimetypes.best_match(
 
        ['application/json', 'text/html']
 
    )
 
    return best == 'application/json' and \
0 comments (0 inline, 0 general)