wnm168 commited on
Commit
ed1a6a3
·
verified ·
1 Parent(s): 5f5b986

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +33 -0
main.py CHANGED
@@ -173,6 +173,30 @@ async def get_file_info(file_id: str):
173
  async def emptytrash():
174
  return await THUNDERX_CLIENT.emptytrash()
175
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
176
  @api_router.get(
177
  "/offline", summary="离线任务列表", description="离线任务列表", tags=["API"]
178
  )
@@ -206,5 +230,14 @@ async def quota_info():
206
  return await THUNDERX_CLIENT.get_quota_info()
207
 
208
 
 
 
 
 
 
 
 
 
 
209
  app.include_router(front_router)
210
  app.include_router(api_router)
 
173
  async def emptytrash():
174
  return await THUNDERX_CLIENT.emptytrash()
175
 
176
+
177
+
178
+ @api_router.post(
179
+ "/file_batch_share", summary="创建分享", description="创建分享", tags=["API"]
180
+ )
181
+ async def file_batch_share(ids: List[str] = None, need_password: bool | None = False,expiration_days:int | None=-1):
182
+ return await THUNDERX_CLIENT.file_batch_share(ids,need_password,expiration_days)
183
+
184
+
185
+
186
+ @api_router.post(
187
+ "/get_share_folder", summary="获取分享信息", description="获取分享信息", tags=["API"]
188
+ )
189
+ async def get_share_folder(share_id: str, pass_code_token: str | None = None,parent_id:str | None=None):
190
+ return await THUNDERX_CLIENT.get_share_folder(share_id,pass_code_token,parent_id)
191
+
192
+
193
+ @api_router.post(
194
+ "/restore", summary="转存分享文件", description="转存分享文件", tags=["API"]
195
+ )
196
+ async def restore(share_id: str, pass_code_token: str | None = None,file_ids:List[str] | None=None):
197
+ return await THUNDERX_CLIENT.restore(share_id,pass_code_token,file_ids)
198
+
199
+
200
  @api_router.get(
201
  "/offline", summary="离线任务列表", description="离线任务列表", tags=["API"]
202
  )
 
230
  return await THUNDERX_CLIENT.get_quota_info()
231
 
232
 
233
+
234
+ @api_router.get(
235
+ "/invite_code", summary="查看邀请码", description="查看邀请码", tags=["API"]
236
+ )
237
+ async def get_invite_code():
238
+ return await THUNDERX_CLIENT.get_invite_code()
239
+
240
+
241
+
242
  app.include_router(front_router)
243
  app.include_router(api_router)