#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Third-party modules
from flask_restx import Namespace, Resource

from .data_access_object import SetupObject

tpl = SetupObject("ob")

api = Namespace('defaults', description='Default parameters')

@api.route("/")
class DefaultsList(Resource):
    
    def get(self):
        """Show all defaults OB files"""
        return tpl.todos

@api.route("/<string:name>")
@api.param("name", "The uniqe name of the default OB")
class DefaultsList(Resource):

    def get(self, name):
        """Show a specific default OB"""
        return tpl.read(name)

