@@ -65,6 +65,9 @@ def build_request(
65
65
tools: Tools to apply to the products. Order defines
66
66
the toolchain order of operatations.
67
67
68
+ Raises:
69
+ planet.specs.SpecificationException: If order_type is not a valid
70
+ order type.
68
71
'''
69
72
details = {
70
73
'name' : name ,
@@ -106,6 +109,11 @@ def product(
106
109
fallback_bundle: In case product_bundle not having
107
110
all asset types available, which would result in failed
108
111
delivery, try a fallback bundle
112
+
113
+ Raises:
114
+ planet.specs.SpecificationException: If bundle or fallback bundle
115
+ are not valid bundles or if item_type is not valid for the given
116
+ bundle or fallback bundle.
109
117
'''
110
118
product_bundle = specs .validate_bundle (product_bundle )
111
119
item_type = specs .validate_item_type (item_type , product_bundle )
@@ -171,6 +179,9 @@ def delivery(
171
179
archive file that is received. Uses the template variables
172
180
{{name}} and {{order_id}}. e.g. "{{name}}_{{order_id}}.zip".
173
181
cloud_config: Cloud delivery configuration.
182
+
183
+ Raises:
184
+ planet.specs.SpecificationException: If archive_type is not valid.
174
185
'''
175
186
if archive_type :
176
187
archive_type = specs .validate_archive_type (archive_type )
@@ -302,6 +313,10 @@ def _tool(name: str, parameters: dict) -> dict:
302
313
Parameters:
303
314
name: Tool name.
304
315
parameters: Tool parameters.
316
+
317
+ Raises:
318
+ planet.specs.SpecificationException: If name is not the name of a valid
319
+ Orders API tool.
305
320
'''
306
321
name = specs .validate_tool (name )
307
322
return {name : parameters }
@@ -356,7 +371,12 @@ def file_format_tool(file_format: str) -> dict:
356
371
357
372
Parameters:
358
373
file_format: The format of the tool output. Either 'COG' or 'PL_NITF'.
374
+
375
+ Raises:
376
+ planet.specs.SpecificationException: If file_format is not one of
377
+ 'COG' or 'PL_NITF'
359
378
'''
379
+ file_format = specs .validate_file_format (file_format )
360
380
return _tool ('file_format' , {'format' : file_format })
361
381
362
382
0 commit comments