How to recursively get asset ID's

Hi there. I’m very new to the Frame API so I’m looking for a little more context around the basic navigation of the platform.

I’ve got my head around the file tree and asset hierarchy but I could do with some best practice on how to access each asset working down the tree to where I want.

For example, I’m trying to write a script that downloads all the assets within a folder within a project.

Maybe I’m looking at it wrong but without looking at the asset’s URL I’m trying to figure out a way of accessing the asset ID within the folder ID, within the project ID, within the Team ID etc. Is there a straightforward way of accessing each in turn or am I approaching this incorrectly?