File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed
Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -201,13 +201,19 @@ def list_projects(ctx, **opts):
201201
202202@cli .command ()
203203@click .argument ("project_id" )
204+ @click .option (
205+ "--skip-metadata/--no-skip-metadata" ,
206+ "skip_metadata" ,
207+ default = True ,
208+ help = "Skip requesting for additional metadata (currently the `sha256` checksum) for each version. Default: --skip-metadata" ,
209+ )
204210@click .pass_context
205- def list_files (ctx , project_id ):
211+ def list_files (ctx , project_id , skip_metadata ):
206212 """List QFieldCloud project files."""
207213
208214 log (f'Getting file list for "{ project_id } "…' )
209215
210- files = ctx .obj ["client" ].list_remote_files (project_id )
216+ files = ctx .obj ["client" ].list_remote_files (project_id , skip_metadata )
211217
212218 if ctx .obj ["format_json" ]:
213219 print_json (files )
Original file line number Diff line number Diff line change @@ -138,8 +138,15 @@ def list_projects(
138138
139139 return resp .json ()
140140
141- def list_remote_files (self , project_id : str ) -> List [Dict [str , Any ]]:
142- resp = self ._request ("GET" , f"files/{ project_id } " )
141+ def list_remote_files (
142+ self , project_id : str , skip_metadata : bool = True
143+ ) -> List [Dict [str , Any ]]:
144+ params = {}
145+
146+ if skip_metadata :
147+ params ["skip_metadata" ] = "1"
148+
149+ resp = self ._request ("GET" , f"files/{ project_id } " , params = params )
143150 return resp .json ()
144151
145152 def create_project (
You can’t perform that action at this time.
0 commit comments