File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -23,13 +23,18 @@ def __repr__(self) -> str:
2323 f"status={ self .status } )"
2424 )
2525
26- def get_scene_index (self ):
26+ def get_scene_index (self , page = 1 , page_size = 100 ):
2727 index_data = self ._connection .get (
28- f"{ ApiPath .rtstream } /{ self .rtstream_id } /{ ApiPath .index } /{ ApiPath .scene } /{ self .rtstream_index_id } "
28+ f"{ ApiPath .rtstream } /{ self .rtstream_id } /{ ApiPath .index } /{ ApiPath .scene } /{ self .rtstream_index_id } " ,
29+ params = {"page" : page , "page_size" : page_size },
2930 )
31+ print (index_data )
3032 if not index_data :
3133 return None
32- return index_data .get ("scene_index_records" , [])
34+ return {
35+ "scenes" : index_data .get ("scene_index_records" , []),
36+ "next_page" : index_data .get ("next_page" , False ),
37+ }
3338
3439 def start (self ):
3540 self ._connection .patch (
@@ -121,7 +126,7 @@ def list_scene_indexes(self):
121126
122127 def get_rtstream_scene_index (self , index_id : str ) -> RTStreamSceneIndex :
123128 index_data = self ._connection .get (
124- f"{ ApiPath .rtstream } /{ self .id } /{ ApiPath .index } /{ ApiPath . scene } / { index_id } "
129+ f"{ ApiPath .rtstream } /{ self .id } /{ ApiPath .index } /{ index_id } "
125130 )
126131 return RTStreamSceneIndex (
127132 _connection = self ._connection ,
You can’t perform that action at this time.
0 commit comments