ni / nisystemlink-clients-python

Python API for interacting with a SystemLink Server, created and supported by NI.
https://ni.com/systemlink
MIT License
10 stars 14 forks source link

Handle HTTP errors and add model for api_info method #23

Closed mure closed 1 year ago

mure commented 1 year ago

What does this Pull Request accomplish?

What testing has been done?

Tested manually locally. Example:

from devtools import debug
from nisystemlink.clients.core import HttpConfiguration
from nisystemlink.clients.dataframe import DataFrameClient

client = DataFrameClient("https://api-stratus-test.ion.ni.com/", "foobar"))

debug(client.api_info())

Output:

scratch.py:12 <module>
    client.api_info(): ApiInfo(
        operations=OperationsV1(
            create_tables=Operation(
                available=True,
                version=1,
            ),
            delete_tables=Operation(
                available=True,
                version=1,
            ),
            modify_metadata=Operation(
                available=True,
                version=1,
            ),
            list_tables=Operation(
                available=True,
                version=1,
            ),
            read_data=Operation(
                available=True,
                version=1,
            ),
            write_data=Operation(
                available=True,
                version=1,
            ),
        ),
    ) (ApiInfo)