# -*- coding: utf-8 -*-

"""
    cvnqplyobj

    This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
"""

from cvnqplyobj.api_helper import APIHelper
from cvnqplyobj.configuration import Configuration
from cvnqplyobj.controllers.base_controller import BaseController
from cvnqplyobj.http.auth.basic_auth import BasicAuth

class APIController(BaseController):

    """A Controller to access Endpoints in the cvnqplyobj API."""


    def get_basic_auth_test(self):
        """Does a GET request to /auth/basic.

        TODO: type endpoint description here.

        Returns:
            string: Response from the API. 

        Raises:
            APIException: When an error occurs while fetching the data from
                the remote API. This exception includes the HTTP Response
                code, an error message, and the HTTP body that was received in
                the request.

        """

        # Prepare query URL
        _url_path = '/auth/basic'
        _query_builder = Configuration.get_base_uri()
        _query_builder += _url_path
        _query_url = APIHelper.clean_url(_query_builder)

        # Prepare and execute request
        _request = self.http_client.get(_query_url)
        BasicAuth.apply(_request)
        _context = self.execute_request(_request)
        self.validate_response(_context)

        # Return appropriate type
        return _context.response.raw_body
