File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -189,9 +189,24 @@ def get_clowder_v1_user_collections_top_level(headers, user_v1):
189189 return top_level_collections
190190
191191def process_collection_descendants (collection , headers ):
192- sub_collections_endpoint = " "
192+ child_collections_endpoint = f" { CLOWDER_V1 } /api/getChildCollections "
193193 datasets_endpoint = f"{ CLOWDER_V1 } /api/datasets"
194194
195+ child_col_response = requests .get (child_collections_endpoint , headers = headers )
196+ dataset_response = requests .get (datasets_endpoint , headers = headers )
197+ child_col_json = child_col_response .json ()
198+ dataset_json = dataset_response .json ()
199+
200+ print (f"Got child collections and datasets" )
201+ for child in child_col_json :
202+ print (f"Make a folder for this child" )
203+ print (f"Call process descendants" )
204+ process_collection_descendants (child , headers )
205+
206+ for dataset in dataset_json :
207+ print (f"Make a folder for this dataset" )
208+ print (f"Add folders and subfolders" )
209+
195210def process_dataset_folders (dataset , headers ):
196211 pass
197212
You can’t perform that action at this time.
0 commit comments