@classmethod
    def _add(cls, slug, task_id, key, sender, recipient, msg, send_time, game):

        try:

            task = GameNotificationTask(slug, task_id, key, sender, recipient, msg, send_time)

            if GameNotificationTaskListManager.add_task(game, task):
                return {
                    'ok': True,
                    'id': task_id
                }

            response.status_int = 429
            return {
                'ok': False,
                'msg': 'limit exceeded.'
            }

        except (GameNotificationTaskError, GameNotificationPathError) as e:
            raise BadRequest('NotificationTask could not be saved: %s' % str(e))
dataset/ETHPy150Open turbulenz/turbulenz_local/turbulenz_local/controllers/apiv1/gamenotifications.py/GamenotificationsController._add/original