# This file was generated by liblab | https://liblab.com/

from .services.place_bets import PlaceBetsService
from .services.get_bets import GetBetsService
from .services.betting_status import BettingStatusService
from .net.environment import Environment


class Pinnacle:
    def __init__(
        self,
        username: str = None,
        password: str = None,
        base_url: str = Environment.DEFAULT.value,
    ):
        """
        Initializes Pinnacle the SDK class.
        """
        self.place_bets = PlaceBetsService(base_url=base_url)
        self.get_bets = GetBetsService(base_url=base_url)
        self.betting_status = BettingStatusService(base_url=base_url)
        self.set_basic_auth(username=username, password=password)

    def set_base_url(self, base_url):
        """
        Sets the base URL for the entire SDK.
        """
        self.place_bets.set_base_url(base_url)
        self.get_bets.set_base_url(base_url)
        self.betting_status.set_base_url(base_url)

        return self

    def set_basic_auth(self, username: str, password: str):
        """
        Sets the username and password for the entire SDK.
        """
        self.place_bets.set_basic_auth(username=username, password=password)
        self.get_bets.set_basic_auth(username=username, password=password)
        self.betting_status.set_basic_auth(username=username, password=password)

        return self


# c029837e0e474b76bc487506e8799df5e3335891efe4fb02bda7a1441840310c
