From 74d299a53a58d5cddfadef7b1a6415f262dc2366 Mon Sep 17 00:00:00 2001 From: Miguel Ballesteros Date: Thu, 7 Nov 2024 17:13:46 -0500 Subject: [PATCH] Doc Rev 7 Nov 2024 --- docs/source/concepts/auth.rst | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/docs/source/concepts/auth.rst b/docs/source/concepts/auth.rst index 1c7b6ce..cfb7dd0 100644 --- a/docs/source/concepts/auth.rst +++ b/docs/source/concepts/auth.rst @@ -8,6 +8,11 @@ Depending on thte service intended to be used, an operation object will need eit ENV variables to store values to instantiate these objects (see Getting Started > Environment Variables > :ref:`gettingstarted_envvariables_auth`). +However, most class constructors look automatically for relevant environment variables +and perform the authentication automatically. + +If an explicit user creation is needed, the following classes can be used: + UserKey ------- @@ -15,7 +20,7 @@ Used by all services except the Article Retrieval Service. Usually it's not requ be instantiated independently as the creation of a `parent` object will get the value from the environment. -If using this class explicitly, the following code snippets can be found helpful: +If using this class explicitly, the following code snippet can be helpful: .. code-block:: python @@ -23,6 +28,13 @@ If using this class explicitly, the following code snippets can be found helpful u = UserKey('abcd1234abcd1234abcd1234abcd1234') se = SnapshotExplain(user_key=u) +When using ENV variables, the above snippet requires only the constructor call from the parent +class, in this case `SnapshotExplain()`. + +.. code-block:: python + + from factiva.analytics import SnapshotExplain + ar = SnapshotExplain() OAuthUser --------- @@ -41,9 +53,10 @@ class explicitly: ar = ArticleRetrieval(oauth_user=ou) ... -When using ENV variables, the above snippet becomes shorter. +When using ENV variables, the above snippet requires only the constructor call from the parent +class, in this case `ArticleRetrieval()`. .. code-block:: python - from factiva.analytics import SrticleRetrieval + from factiva.analytics import ArticleRetrieval ar = ArticleRetrieval()