@@ -38,23 +38,27 @@ def __init__(self, account_slug: str, json_content: Optional[dict[str, Any]] = N
3838 self .__account_slug = account_slug
3939 self .__api_key_internal = api_key
4040
41+ @property
42+ def _account_slug (self ) -> str :
43+ return self .__account_slug
44+
4145 @property
4246 def _end_point (self ) -> str :
43- return super ()._end_point + f'/{ self .__account_slug } '
47+ return super ()._end_point + f'/{ self ._account_slug } '
4448
4549 def _populate_json (self ) -> None :
4650 self ._json_content = self ._get_response (endpoint = '' )['account' ]
47- if self .__account_slug != self ._json_content ['slug' ]:
51+ if self ._account_slug != self ._json_content ['slug' ]:
4852 raise ValueError ('slug in json content does not match expected value' )
4953
5054 def __event_getter (self , end_point : str ) -> dict [str , Event ]:
5155 response = self ._get_response (end_point )
5256 return_dict :dict [str , Event ] = {}
5357 for event in response ['events' ]:
54- if event ['account_slug' ] != self .__account_slug :
58+ if event ['account_slug' ] != self ._account_slug :
5559 raise RuntimeError ('Account Slug inconsistency' )
5660 slug = event ['slug' ]
57- return_dict [slug ] = Event (event_slug = slug , account_slug = self .__account_slug ,
61+ return_dict [slug ] = Event (event_slug = slug , account_slug = self ._account_slug ,
5862 api_key = self .__api_key_internal ,
5963 json_content = event )
6064 return return_dict
0 commit comments