Skip to content

Commit c2da201

Browse files
committed
doc: add ONC parameter explanation in tutorial
1 parent 371908d commit c2da201

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

doc/source/Tutorial/onc_Library_Tutorial.ipynb

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@
4242
"!{sys.executable} -m pip install --upgrade requests pandas onc"
4343
]
4444
},
45+
{
46+
"cell_type": "markdown",
47+
"metadata": {},
48+
"source": [
49+
"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",
50+
"All the library's functionality is provided as methods of this class.\n"
51+
]
52+
},
4553
{
4654
"cell_type": "code",
4755
"execution_count": null,
@@ -58,6 +66,21 @@
5866
"onc = ONC(\"YOUR_TOKEN\")"
5967
]
6068
},
69+
{
70+
"cell_type": "markdown",
71+
"metadata": {},
72+
"source": [
73+
"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",
74+
"\n",
75+
"```python\n",
76+
"onc = ONC(\"YOUR_TOKEN\", showInfo=True, outPath=\"YOUR_DIRECTORY\")\n",
77+
"```\n",
78+
"\n",
79+
"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",
80+
"\n",
81+
"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"
82+
]
83+
},
6184
{
6285
"cell_type": "code",
6386
"execution_count": null,
@@ -756,7 +779,7 @@
756779
}
757780
},
758781
"source": [
759-
"Once we have the file names, you can use the method **\"downloadArchivefile()\"** to download individual files:\n"
782+
"Once we have the file names, you can use the method `downloadArchivefile()` to download individual files:\n"
760783
]
761784
},
762785
{

0 commit comments

Comments
 (0)