コード例 #1
0
ファイル: parser_api.py プロジェクト: htomika/gaeFeedFind
    def reports_insert(self, request):
        """Exposes an API endpoint to insert a report for the current user.

        Args:
            request: An instance of ReportRequestMessage parsed from the API
                request.

        Returns:
            An instance of ReportResponseMessage containing the report inserted,
            the time the report was inserted and the ID of the report.
        """
        current_user = users.get_current_user()
        if not current_user:
            logging.log(logging.INFO, current_user)
            # raise endpoints.ForbiddenException()
        entity = Report.put_from_message(request)
        deferred.defer(parsepage, entity, _countdown=30, _queue="parsequeue")
        return entity.to_message()