@@ -93,11 +93,11 @@ async def take_rear_photo(self) -> bool:
9393
9494 async def fetch_pictures (self , num_to_get : int = - 1 ) -> List [dict ]:
9595 warnings .warn (
96- "Device.fetch_pictures() is deprecated; use get_pictures ()" ,
96+ "Device.fetch_pictures() is deprecated; use get_picture_blobs ()" ,
9797 DeprecationWarning ,
9898 stacklevel = 2 ,
9999 )
100- return await self .get_pictures (num_to_get = num_to_get )
100+ return await self .get_picture_blobs (num_to_get = num_to_get )
101101
102102 async def download_photo (self , picture_blob_b64 : str ) -> PhotoResult :
103103 """
@@ -122,12 +122,28 @@ async def take_rear_picture(self) -> bool:
122122 return await self .client .take_picture ("back" )
123123
124124 async def get_pictures (self , num_to_get : int = - 1 ) -> List [dict ]:
125- """Get picture blobs (metadata) from the server.
125+ """Deprecated: use get_picture_blobs()."""
126+ warnings .warn (
127+ "Device.get_pictures() is deprecated; use get_picture_blobs()" ,
128+ DeprecationWarning ,
129+ stacklevel = 2 ,
130+ )
131+ return await self .get_picture_blobs (num_to_get = num_to_get )
126132
127- Returns the raw list from the server (typically base64-encoded encrypted blobs)."""
133+ async def get_picture (self , picture_blob_b64 : str ) -> PhotoResult :
134+ """Deprecated: use decode_picture()."""
135+ warnings .warn (
136+ "Device.get_picture() is deprecated; use decode_picture()" ,
137+ DeprecationWarning ,
138+ stacklevel = 2 ,
139+ )
140+ return await self .decode_picture (picture_blob_b64 )
141+
142+ async def get_picture_blobs (self , num_to_get : int = - 1 ) -> List [dict ]:
143+ """Get raw picture blobs (base64-encoded encrypted strings) from the server."""
128144 return await self .client .get_pictures (num_to_get = num_to_get )
129145
130- async def get_picture (self , picture_blob_b64 : str ) -> PhotoResult :
146+ async def decode_picture (self , picture_blob_b64 : str ) -> PhotoResult :
131147 """Decrypt and decode a single picture blob into a PhotoResult."""
132148 decrypted = self .client .decrypt_data_blob (picture_blob_b64 )
133149 # decrypted is bytes, often containing a base64-encoded image (as text)
0 commit comments