File tree 2 files changed +17
-4
lines changed
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):
201
201
202
202
@cli .command ()
203
203
@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
+ )
204
210
@click .pass_context
205
- def list_files (ctx , project_id ):
211
+ def list_files (ctx , project_id , skip_metadata ):
206
212
"""List QFieldCloud project files."""
207
213
208
214
log (f'Getting file list for "{ project_id } "…' )
209
215
210
- files = ctx .obj ["client" ].list_remote_files (project_id )
216
+ files = ctx .obj ["client" ].list_remote_files (project_id , skip_metadata )
211
217
212
218
if ctx .obj ["format_json" ]:
213
219
print_json (files )
Original file line number Diff line number Diff line change @@ -138,8 +138,15 @@ def list_projects(
138
138
139
139
return resp .json ()
140
140
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 )
143
150
return resp .json ()
144
151
145
152
def create_project (
You can’t perform that action at this time.
0 commit comments