OceanNetworksCanada / api-python-client

Provides easy access to ONC data in Python
https://oceannetworkscanada.github.io/api-python-client/
Apache License 2.0
10 stars 9 forks source link

Replace method=getXXX in the url query paramters with updated end points #27

Open kan-fu opened 6 months ago

kan-fu commented 6 months ago

There are two ways to get a location tree

  1. Use /location/tree.
  2. Use /location?method=getTree.

The OpenAPI page uses the first style, while the client library uses the second one. They are handled equally in the backend, but it would be better to update the client library to follow the first style.

There are also other methods that need update like _OncRealTime.py, _OncArchive.py and _OncDelivery.py.

Jacob-Stevens-Haas commented 6 months ago

Just to clarify, you don't mean removing methods like ONC.getLocations(), but to get them to call the Oceans 3 API differently?

kan-fu commented 6 months ago

Just to clarify, you don't mean removing methods like ONC.getLocations(), but to get them to call the Oceans 3 API differently?

You are right. Now I look at the title, it really seems that I want to delete the public methods :sweat_smile:. I have updated the title to make it more clear.