77 deal_status ,
88 get_uploads as getUploads ,
99 download as _download ,
10- get_balance as getBalance
10+ get_file_info as getFileInfo
1111)
1212
1313
@@ -44,18 +44,6 @@ def uploadBlob(self, source: io.BufferedReader, filename: str, tag: str = ''):
4444 return d .uploadBlob (source , filename , self .token , tag )
4545 except Exception as e :
4646 raise e
47-
48- def getBalance (self ):
49- """
50- Retrieve the balance information of a user from the Lighthouse.
51-
52- :param publicKey: str, The public key of the user.
53- :return: dict[str, any], A dictionary containing the data usage and data limit details.
54- """
55- try :
56- return getBalance .get_balance (self .token )
57- except Exception as e :
58- raise e
5947
6048 @staticmethod
6149 def downloadBlob (dist : io .BufferedWriter , cid : str , chunk_size = 1024 * 1024 * 10 ):
@@ -86,18 +74,16 @@ def getDealStatus(cid: str):
8674 return deal_status .get_deal_status (cid )
8775 except Exception as e :
8876 raise e
89-
90- @staticmethod
91- def getUploads (publicKey : str , pageNo : int = 1 ):
77+
78+ def getUploads (self , lastKey : str = None ):
9279 """
9380 Get uploads from the Lighthouse.
9481
95- :param publicKey: str, public key
96- :param pageNo: int, page number (default: 1)
82+ :param lastKey: To navigate to different pages of results
9783 :return: List[t.DealData], list of deal data
9884 """
9985 try :
100- return getUploads .get_uploads (publicKey , pageNo )
86+ return getUploads .get_uploads (self . token , lastKey )
10187 except Exception as e :
10288 raise e
10389
@@ -114,6 +100,19 @@ def download(cid: str):
114100 return _download .get_file (cid )
115101 except Exception as e :
116102 raise e
103+
104+ @staticmethod
105+ def getFileInfo (cid : str ):
106+ """
107+ Retrieves information about a file using its CID (Content Identifier).
108+ :param cid: str, Content Identifier for the data to be downloaded
109+ returns: dict, A dictionary containing file information.
110+ """
111+
112+ try :
113+ return getFileInfo .get_file_info (cid )
114+ except Exception as e :
115+ raise e
117116
118117 def getTagged (self , tag : str ):
119118 """
0 commit comments