Skip to content

Commit 63bcf28

Browse files
committed
feat: add header manager properties
1 parent 02714a0 commit 63bcf28

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

yaylib/client.py

+35
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,26 @@ def __init__(self, device: Device, state: State, locale="ja") -> None:
199199
self.__connection_type = "wifi"
200200
self.__content_type = "application/json;charset=UTF-8"
201201

202+
@property
203+
def locale(self):
204+
"""ロケール"""
205+
return self.__locale
206+
207+
@property
208+
def user_agent(self):
209+
"""ユーザーエージェント"""
210+
return self.__user_agent
211+
212+
@property
213+
def device_info(self) -> str:
214+
"""デバイス情報"""
215+
return self.__device_info
216+
217+
@property
218+
def app_version(self) -> str:
219+
"""アプリバージョン"""
220+
return self.__app_version
221+
202222
@property
203223
def client_ip(self) -> str:
204224
"""クライアント IP アドレス"""
@@ -208,6 +228,21 @@ def client_ip(self) -> str:
208228
def client_ip(self, value: str) -> None:
209229
self.__client_ip = value
210230

231+
@property
232+
def connection_speed(self) -> str:
233+
"""コネクション速度"""
234+
return self.__connection_speed
235+
236+
@property
237+
def connection_type(self) -> str:
238+
"""コネクション種別"""
239+
return self.__connection_type
240+
241+
@property
242+
def content_type(self) -> str:
243+
"""コンテントタイプ"""
244+
return self.__content_type
245+
211246
def generate(self, jwt_required=False) -> Dict[str, str]:
212247
"""HTTPヘッダーを生成する"""
213248
headers = {

0 commit comments

Comments
 (0)