hermes.commands.init.util.connect_zenodo
========================================

.. py:module:: hermes.commands.init.util.connect_zenodo


Attributes
----------

.. autoapisummary::

   hermes.commands.init.util.connect_zenodo.USING_SANDBOX_AS_DEFAULT
   hermes.commands.init.util.connect_zenodo.local_port
   hermes.commands.init.util.connect_zenodo.sandbox_client_id
   hermes.commands.init.util.connect_zenodo.sandbox_client_secret
   hermes.commands.init.util.connect_zenodo.real_client_id
   hermes.commands.init.util.connect_zenodo.real_client_secret
   hermes.commands.init.util.connect_zenodo.url_suffix_authorize
   hermes.commands.init.util.connect_zenodo.url_suffix_token
   hermes.commands.init.util.connect_zenodo.url_suffix_api_list
   hermes.commands.init.util.connect_zenodo.scope


Functions
---------

.. autoapisummary::

   hermes.commands.init.util.connect_zenodo.setup
   hermes.commands.init.util.connect_zenodo.oauth_process
   hermes.commands.init.util.connect_zenodo.get_tokens
   hermes.commands.init.util.connect_zenodo.get_refresh_token
   hermes.commands.init.util.connect_zenodo.test_if_token_is_valid
   hermes.commands.init.util.connect_zenodo.test_if_refresh_token_authorization_works


Module Contents
---------------

.. py:data:: USING_SANDBOX_AS_DEFAULT
   :value: True


.. py:data:: local_port
   :value: 8334


.. py:data:: sandbox_client_id
   :value: 'QJ8Q9GBI78uOdNmVNK1Vd0oAOJHqmYGvxRxiSFxt'


.. py:data:: sandbox_client_secret
   :value: 'nGuOqoDtd2tckP6lmQS3If3cY39lPLKLU8skcv72JeowNupMD2bnLparsGO9'


.. py:data:: real_client_id
   :value: 'L0d9HQVW4Ig9PnC6qh6zkOAwgvYy08GcmHJqVVvV'


.. py:data:: real_client_secret
   :value: '0HIvtC2D2aPvpq2W0GtfWdeivwkqvnvrOTGx14nUJA5lDXrEDSaQAnqxHbLH'


.. py:data:: url_suffix_authorize
   :value: '/oauth/authorize'


.. py:data:: url_suffix_token
   :value: '/oauth/token'


.. py:data:: url_suffix_api_list
   :value: '/api/deposit/depositions'


.. py:data:: scope
   :value: 'deposit:write deposit:actions'


.. py:function:: setup(zenodo_url='https://sandbox.zenodo.org/', display_name='')

.. py:function:: oauth_process() -> hermes.commands.init.util.oauth_process.OauthProcess

.. py:function:: get_tokens() -> dict[str:str]

   Starts the oauth procedure and returns collected tokens as dict


.. py:function:: get_refresh_token(with_prefix: bool = True) -> str

.. py:function:: test_if_token_is_valid(token: str) -> bool

.. py:function:: test_if_refresh_token_authorization_works()

