<script src="https://wiki.oceannetworks.ca/download/attachments/75170291/docs-client-libraries.js"></script> |
This class provides a wrapper for Oceans 2.0 API requests. All the client library's functionality is provided as methods of this class.
Create an ^ONC | Onc | Onc object to access this library's functionalities.
Constructor parameters | |||
|
Parameter | Type | Description | Example |
---|---|---|---|
token | string | Your ONC API token. Once logged in at https://data.oceannetworks.ca/login, your token can be retrieved or generated at https://data.oceannetworks.ca/Profile. Click on the "Web Services" tab, then click "Generate Token". | 'YOUR_TOKEN_HERE' |
production | boolean | Indicates whether the ONC Production server URL is used for service requests.
Default: True | True |
showInfo | boolean | Indicates whether verbose script messages are displayed, such as request url and processing time information.
Default: False | True |
outPath | string | When using methods that download files, the path that files are saved to (relative to the current directory). If the path provided doesn't exist, it will be created. Default: 'output' | 'output' |
timeout | int | Number of seconds before a request to the API is canceled due to a timeout. Default: 60 | 30 |
Example: Creating an Onc object | |
|