parameters: (self)
docstring: Handles notification pings.
docstring_summary: Handles notification pings.
docstring_tokens: Handles notification pings .
function: def post(self):
      """Handles notification pings."""
      logging.info('Got a notification with payload %s', self.request.body)
      data = json.loads(self.request.body)
      userid = data['userToken']
      # TODO: Check that the userToken is a valid userToken.
      self.mirror_service = util.create_service(
          'mirror', 'v1',
          StorageByKeyName(Credentials, userid, 'credentials').get())
      if data.get('collection') == 'locations':
        self._handle_locations_notification(data)
      elif data.get('collection') == 'timeline':
        self._handle_timeline_notification(data)
function_tokens: def post ( self ) : logging . info ( 'Got a notification with payload %s' , self . request . body ) data = json . loads ( self . request . body ) userid = data [ 'userToken' ] # TODO: Check that the userToken is a valid userToken. self . mirror_service = util . create_service ( 'mirror' , 'v1' , StorageByKeyName ( Credentials , userid , 'credentials' ) . get ( ) ) if data . get ( 'collection' ) == 'locations' : self . _handle_locations_notification ( data ) elif data . get ( 'collection' ) == 'timeline' : self . _handle_timeline_notification ( data )