Skip to content

Commit

Permalink
Merge pull request #52 from OceanNetworksCanada/update-tutorial
Browse files Browse the repository at this point in the history
doc: add ONC parameter explanation in tutorial
  • Loading branch information
aschlesin authored Nov 21, 2024
2 parents 371908d + c2da201 commit ba769f1
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion doc/source/Tutorial/onc_Library_Tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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"
]
},
{
Expand Down

0 comments on commit ba769f1

Please sign in to comment.