From 5a4f0ae8c1635a96a91d7c435d45535a4fb0d2c1 Mon Sep 17 00:00:00 2001 From: Ganesh Nithin Date: Fri, 29 Nov 2024 12:50:34 +0530 Subject: [PATCH] feat: add api references for system client API. Signed-off-by: Ganesh Nithin --- docs/api_reference.rst | 1 + docs/api_reference/system.rst | 18 ++++++++++++++++++ docs/getting_started.rst | 28 ++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 docs/api_reference/system.rst diff --git a/docs/api_reference.rst b/docs/api_reference.rst index e3bd991a..bf0e8ecd 100644 --- a/docs/api_reference.rst +++ b/docs/api_reference.rst @@ -14,6 +14,7 @@ API Reference api_reference/dataframe api_reference/spec api_reference/file + api_reference/system Indices and tables ------------------ diff --git a/docs/api_reference/system.rst b/docs/api_reference/system.rst new file mode 100644 index 00000000..ed6440ec --- /dev/null +++ b/docs/api_reference/system.rst @@ -0,0 +1,18 @@ +.. _api_tag_page: + +nisystemlink.clients.system +====================== + +.. autoclass:: nisystemlink.clients.system.SystemClient + :exclude-members: __init__ + + .. automethod:: __init__ + .. automethod:: list_jobs + .. automethod:: create_job + .. automethod:: get_job_summary + .. automethod:: query_jobs + .. automethod:: cancel_jobs + +.. automodule:: nisystemlink.clients.system.models + :members: + :imported-members: diff --git a/docs/getting_started.rst b/docs/getting_started.rst index ffdb564a..7d46fb9b 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -210,5 +210,33 @@ Examples Get the metadata of a File using its Id and download it. .. literalinclude:: ../examples/file/download_file.py + :language: python + :linenos: + + +System API +------- + +Overview +~~~~~~~~ + +The :class:`.SystemClient` class is the primary entry point of the System API. + +When constructing a :class:`.SystemClient`, you can pass an +:class:`.HttpConfiguration` (like one retrieved from the +:class:`.HttpConfigurationManager`), or let :class:`.SystemClient` use the +default connection. The default connection depends on your environment. + +With a :class:`.SystemClient` object, you can: + +* Create, get, query, and cancel jobs +* Get the summary of a jobs + +Examples +~~~~~~~~ + +Create, get, query, and cancel jobs + +.. literalinclude:: ../examples/system/system.py :language: python :linenos: \ No newline at end of file