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

# Third-party modules
from flask_restx import Namespace, Resource

from .data_access_object import SetupObject

seo = SetupObject("ref")

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

@api.route("/")
class DefaultsList(Resource):
    
    def get(self):
        """Show all defaults OB files"""
        return seo.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 seo.read(name)
