1111import  logging 
1212from  abc  import  ABC , abstractmethod 
1313
14- from  frequenz .client .microgrid  import  ApiClient ,  Location , Metadata 
14+ from  frequenz .client .microgrid  import  Location , Metadata ,  MicrogridApiClient 
1515
1616from  .component_graph  import  ComponentGraph , _MicrogridComponentGraph 
1717
@@ -41,8 +41,8 @@ def server_url(self) -> str:
4141
4242    @property  
4343    @abstractmethod  
44-     def  api_client (self ) ->  ApiClient :
45-         """Get ApiClient . 
44+     def  api_client (self ) ->  MicrogridApiClient :
45+         """Get the MicrogridApiClient . 
4646
4747        Returns: 
4848            api client 
@@ -97,7 +97,7 @@ def __init__(self, server_url: str) -> None:
9797                `grpc://localhost:1090?ssl=true`. 
9898        """ 
9999        super ().__init__ (server_url )
100-         self ._api  =  ApiClient (server_url )
100+         self ._api  =  MicrogridApiClient (server_url )
101101        # To create graph from the api we need await. 
102102        # So create empty graph here, and update it in `run` method. 
103103        self ._graph  =  _MicrogridComponentGraph ()
@@ -106,8 +106,8 @@ def __init__(self, server_url: str) -> None:
106106        """The metadata of the microgrid.""" 
107107
108108    @property  
109-     def  api_client (self ) ->  ApiClient :
110-         """Get ApiClient . 
109+     def  api_client (self ) ->  MicrogridApiClient :
110+         """Get the MicrogridApiClient . 
111111
112112        Returns: 
113113            api client 
@@ -154,7 +154,7 @@ async def _update_api(self, server_url: str) -> None:
154154        """ 
155155        await  super ()._update_api (server_url )  # pylint: disable=protected-access 
156156
157-         self ._api  =  ApiClient (server_url )
157+         self ._api  =  MicrogridApiClient (server_url )
158158        await  self ._initialize ()
159159
160160    async  def  _initialize (self ) ->  None :
0 commit comments