@@ -0,0 +1,1021 @@
+from http import HTTPStatus%0Afrom flask_restx import Resource%0Afrom flask import request%0A%0Afrom app.api import api%0Afrom app.api.helpers import token_required%0Afrom app.api.serializers import TaskSerializer%0Afrom app.api.constants import LIMIT_PER_CHUNK%0Afrom app.database import Task%0A%0A%0Adef setup_tasks_endpoint():%0A    endpoint = api.namespace(name='tasks',%0A                             description='Endpoint to handle tasks CRUD operations.')%0A%0A    @endpoint.route('/')%0A    class ListTasks(Resource):%0A        @endpoint.marshal_list_with(TaskSerializer)%0A        @endpoint.param('chunk', f'dividing tasks into chunks of %7BLIMIT_PER_CHUNK%7D, default is 1.')%0A        @endpoint.doc(security='apiKey')%0A        @token_required%0A        def get(self):%0A            ''' Get list of tasks. '''%0A            chunk = request.args.get('chunk', 1, type=int)%0A%0A            return Task.query.paginate(chunk,%0A                                       per_page=LIMIT_PER_CHUNK,%0A                                       error_out=False).items, HTTPStatus.OK%0A

Add tasks API endpoints.