7
7
deal_status ,
8
8
get_uploads as getUploads ,
9
9
download as _download ,
10
- get_balance as getBalance
10
+ get_file_info as getFileInfo
11
11
)
12
12
13
13
@@ -44,18 +44,6 @@ def uploadBlob(self, source: io.BufferedReader, filename: str, tag: str = ''):
44
44
return d .uploadBlob (source , filename , self .token , tag )
45
45
except Exception as e :
46
46
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
59
47
60
48
@staticmethod
61
49
def downloadBlob (dist : io .BufferedWriter , cid : str , chunk_size = 1024 * 1024 * 10 ):
@@ -86,18 +74,16 @@ def getDealStatus(cid: str):
86
74
return deal_status .get_deal_status (cid )
87
75
except Exception as e :
88
76
raise e
89
-
90
- @staticmethod
91
- def getUploads (publicKey : str , pageNo : int = 1 ):
77
+
78
+ def getUploads (self , lastKey : str = None ):
92
79
"""
93
80
Get uploads from the Lighthouse.
94
81
95
- :param publicKey: str, public key
96
- :param pageNo: int, page number (default: 1)
82
+ :param lastKey: To navigate to different pages of results
97
83
:return: List[t.DealData], list of deal data
98
84
"""
99
85
try :
100
- return getUploads .get_uploads (publicKey , pageNo )
86
+ return getUploads .get_uploads (self . token , lastKey )
101
87
except Exception as e :
102
88
raise e
103
89
@@ -114,6 +100,19 @@ def download(cid: str):
114
100
return _download .get_file (cid )
115
101
except Exception as e :
116
102
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
117
116
118
117
def getTagged (self , tag : str ):
119
118
"""
0 commit comments