|
282 | 282 | ],
|
283 | 283 | "source": [
|
284 | 284 | "item_props = ItemProperties(\n",
|
285 |
| - " \"title\" = out_file,\n", |
286 |
| - " \"type\" = ItemTypeEnum.CSV,\n", |
287 |
| - " \"tags\" = \"user_profile_report\",\n", |
288 |
| - " \"snippet\" = \"Report on user profile data from Python API\"\n", |
| 285 | + " title = out_file,\n", |
| 286 | + " item_type = ItemTypeEnum.CSV,\n", |
| 287 | + " tags = \"user_profile_report\",\n", |
| 288 | + " snippet = \"Report on user profile data from Python API\"\n", |
289 | 289 | ")\n",
|
290 | 290 | "\n",
|
291 | 291 | "root_folder = gis.content.folders.get()\n",
|
292 | 292 | "\n",
|
293 |
| - "root_folder.add(\n", |
| 293 | + "item = root_folder.add(\n", |
294 | 294 | " item_properties = item_props,\n",
|
295 | 295 | " file= os.path.join(output_dir + out_file)\n",
|
296 | 296 | ").result()"
|
|
309 | 309 | "metadata": {},
|
310 | 310 | "outputs": [],
|
311 | 311 | "source": [
|
312 |
| - "item = gis.content.get(item_id)\n", |
| 312 | + "item = gis.content.get(item.id)\n", |
313 | 313 | "item.delete()"
|
314 | 314 | ]
|
315 | 315 | },
|
|
343 | 343 | "name": "python",
|
344 | 344 | "nbconvert_exporter": "python",
|
345 | 345 | "pygments_lexer": "ipython3",
|
346 |
| - "version": "3.11.10" |
| 346 | + "version": "3.11.11" |
347 | 347 | },
|
348 | 348 | "toc": {
|
349 | 349 | "base_numbering": 1,
|
|
0 commit comments