From 5bc93a76105abb913e9059628093ec2855ea3fc3 Mon Sep 17 00:00:00 2001 From: Oleh Paduchak Date: Mon, 4 Nov 2024 14:37:00 +0200 Subject: [PATCH] added onedrive settings --- addon_imps/storage/onedrive.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/addon_imps/storage/onedrive.py b/addon_imps/storage/onedrive.py index 10e7124e..a20b6df3 100644 --- a/addon_imps/storage/onedrive.py +++ b/addon_imps/storage/onedrive.py @@ -30,6 +30,14 @@ async def list_root_items(self, page_cursor: str = "") -> storage.ItemSampleResu total_count=1, ) + async def build_wb_config(self, root_folder_id: str, service_name: str) -> dict: + async with self.network.GET("me/drive") as _response: + json = await _response.json_content() + return { + "folder": root_folder_id, + "drive_id": json.get("id"), + } + async def get_item_info(self, item_id: str) -> storage.ItemResult: async with self.network.GET( f"me/drive/items/{item_id}",