Metadata-Version: 2.1
Name: signinghubapi
Version: 0.1.3
Summary: Package with default calls for the SigningHub API
Home-page: https://github.com/erwinmintiens/signinghub-api
Author: Erwin Mintiens
Author-email: erwin.mintiens@gmail.com
License: UNKNOWN
Keywords: SigningHub,API
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: License :: OSI Approved :: MIT License
Description-Content-Type: text/markdown
Requires-Dist: requests

# Description
[SigningHub](https://www.signinghub.com/) is a platform which is mainly used to sign documents with a digital or electronic signature.
On SigningHub, documents, users and settings can be uploaded and managed through the web view, as well as through the API.
This package focusses on the usage of said API through Python.

Signinghubapi package is the python integration of the SigningHub API. Most of the SigningHub API calls have been translated to python.

SigningHub API guide can be found [here](https://manuals.keysign.eu).

Both API v3 (SigningHub 7.7.9 and earlier) and API v4 (SigningHub 7.7.9 and above) have been integrated.

# Dependencies
This Python package depends on the ```requests``` module:

[Requests on PyPI](https://pypi.org/project/requests/)

[Requests on GitHub](https://github.com/psf/requests)

# Usage
Install this package with the command ```pip install signinghubapi```.

This package can be used to create a ```Connection``` object which connects to SigningHub.

Required parameters are:
- An URL;
- An API connector client ID;
- An API connector client secret.

Optional parameters are:
- A username (email address) to authenticate with;
- A password to authenticate with;
- A scope to authenticate with;
- An access token;
- A refresh token;
- An API version (3 or 4, depending on your SigningHub version);
- An API port (if the API URL is not defined as a URL).

This object can execute the calls which are found in the API guide. These calls are translated to Python and the ```requests.Response``` object will be returned each time.

The validity of the provided URL can be tested with a ```about_signinghub()``` call. This call only requires the provided URL to work.

## Example
```python
>>> from signinghubapi.signinghubapi import Connection
>>> conn = Connection(url='https://api.signinghub.com/', client_id='testclientid', client_secret='testclientsecret', username='test@email.com', password='1234')
>>> about = conn.about_signinghub()
>>> about.status_code
200
>>> about.text
'{"installation_name":"SigningHub","version":"7.7.8.26","build":"778...'
>>> authentication = conn.authenticate()
>>> authentication.status_code
200
>>> authentication.text
'{"access_token":"LPAGaUoJ71Wi53vngCMty8i...'
```


