From c2da2019c9e6995b0c97af4b5f23244707ac3f16 Mon Sep 17 00:00:00 2001 From: Kan Fu Date: Thu, 21 Nov 2024 11:59:50 -0800 Subject: [PATCH] doc: add ONC parameter explanation in tutorial --- .../Tutorial/onc_Library_Tutorial.ipynb | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/doc/source/Tutorial/onc_Library_Tutorial.ipynb b/doc/source/Tutorial/onc_Library_Tutorial.ipynb index 83a01fa..4159578 100644 --- a/doc/source/Tutorial/onc_Library_Tutorial.ipynb +++ b/doc/source/Tutorial/onc_Library_Tutorial.ipynb @@ -42,6 +42,14 @@ "!{sys.executable} -m pip install --upgrade requests pandas onc" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "To begin using the library, you need to create an instance from the `ONC` class, which is a wrapper class for Oceans 3.0 API requests.\n", + "All the library's functionality is provided as methods of this class.\n" + ] + }, { "cell_type": "code", "execution_count": null, @@ -58,6 +66,21 @@ "onc = ONC(\"YOUR_TOKEN\")" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Besides the token parameter, there are several other parameters you can modify to change the behavior of the `ONC` class. For example, you can use\n", + "\n", + "```python\n", + "onc = ONC(\"YOUR_TOKEN\", showInfo=True, outPath=\"YOUR_DIRECTORY\")\n", + "```\n", + "\n", + "to indicate that you want to see verbose messages after running each method, and you want the download directory to be \"./YOUR_DIRECTORY\" instead of the default \"./output\" when calling methods that involve downloading files like `orderDataProduct` and `downloadArchivefile`.\n", + "\n", + "For more information, check the API reference of the [ONC](https://oceannetworkscanada.github.io/api-python-client/autoapi/onc/index.html#onc.ONC) class.\n" + ] + }, { "cell_type": "code", "execution_count": null, @@ -756,7 +779,7 @@ } }, "source": [ - "Once we have the file names, you can use the method **\"downloadArchivefile()\"** to download individual files:\n" + "Once we have the file names, you can use the method `downloadArchivefile()` to download individual files:\n" ] }, {