Ejemplo n.º 1
0
def enabled_features(request):
  """Adds a USE_FEATURENAME flags for each enabled feature (see features.py)"""
  # TODO(mikey): this might make it harder to diagnose why features aren't
  # visible/being used.
  ret = {}
  ret['USE_FACEBOOK'] = features.use_facebook()
  ret['USE_FOURSQUARE'] = features.use_foursquare()
  ret['USE_TWITTER'] = features.use_twitter()
  ret['USE_UNTAPPD'] = features.use_untappd()
  return ret
Ejemplo n.º 2
0
def handle_new_event(event):
  if features.use_twitter():
    LOGGER.info('handle_new_event: dispatching to twitter ..')
    twitter_tasks.tweet_event(event)
  else:
    LOGGER.info('handle_new_event: twitter not enabled, skipping.')

  if features.use_foursquare():
    LOGGER.info('handle_new_event: dispatching to foursquare ..')
    foursquare_tasks.checkin_event(event)
  else:
    LOGGER.info('handle_new_event: foursquare not enabled, skipping.')

  if features.use_untappd():
    LOGGER.info('handle_new_event: dispatching to untappd ..')
    untappd_tasks.checkin_event(event)
  else:
    LOGGER.info('handle_new_event: untappd not enabled, skipping.')
Ejemplo n.º 3
0
def handle_new_picture(picture_id):
  if features.use_foursquare():
    LOGGER.info('handle_new_picture: dispatching to foursquare ..')
    foursquare_tasks.handle_new_picture(picture_id)
  else:
    LOGGER.info('handle_new_picture: foursquare not enabled, skipping.')