Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate SDK using a generator #2

Merged
merged 40 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
b2c383d
Generate SDK using a generator (Issue #1) implementation started
Aditya-Kumar-Code Apr 21, 2024
40bbcdb
abdm-hiu-sdk created using open-api generator
Aditya-Kumar-Code Apr 22, 2024
9ad8170
new apis created
Aditya-Kumar-Code Apr 23, 2024
a5e42b4
file check
Aditya-Kumar-Code Apr 23, 2024
6321ed7
some changes done
Aditya-Kumar-Code Apr 23, 2024
45e68cb
uneccesary file removal
Aditya-Kumar-Code Apr 23, 2024
34d403c
file remove
Aditya-Kumar-Code Apr 23, 2024
63500a8
remove
Aditya-Kumar-Code Apr 23, 2024
1305eea
push change
Aditya-Kumar-Code Apr 23, 2024
4128af3
file delete
Aditya-Kumar-Code Apr 23, 2024
cd19c14
Delete .DS_Store
Aditya-Kumar-Code Apr 23, 2024
01ddd28
getting data example
Aditya-Kumar-Code Apr 23, 2024
0f50f92
edit
Aditya-Kumar-Code Apr 23, 2024
602eae2
readme changed
Aditya-Kumar-Code Apr 23, 2024
2c90c88
change
Aditya-Kumar-Code Apr 23, 2024
b74195e
txt removed
Aditya-Kumar-Code Apr 23, 2024
93646d4
small changes
Aditya-Kumar-Code Apr 23, 2024
d4a407c
examples added
Aditya-Kumar-Code Apr 23, 2024
05745bf
sdk created
Aditya-Kumar-Code Apr 24, 2024
dc5e55d
yaml modified
Aditya-Kumar-Code Apr 24, 2024
12e4723
ruff format
Aditya-Kumar-Code Apr 25, 2024
c820815
ruff --fix
Aditya-Kumar-Code Apr 25, 2024
373deca
ruff
Aditya-Kumar-Code Apr 25, 2024
c62dddf
unit testing done
Aditya-Kumar-Code Apr 25, 2024
0bcdd86
workflow
Aditya-Kumar-Code Apr 25, 2024
ea664af
ruff
Aditya-Kumar-Code Apr 25, 2024
967dda1
linting
Aditya-Kumar-Code Apr 25, 2024
1b981da
linting done
Aditya-Kumar-Code Apr 25, 2024
5896303
format
Aditya-Kumar-Code Apr 25, 2024
5047028
gitignore
Aditya-Kumar-Code Apr 25, 2024
ddf1734
test type check skipped
Aditya-Kumar-Code Apr 25, 2024
f12ccd6
Delete .DS_Store
Aditya-Kumar-Code Apr 25, 2024
ea16e86
Pycache deleted
Aditya-Kumar-Code Apr 25, 2024
f1c6f96
format
Aditya-Kumar-Code Apr 25, 2024
dc0b52b
push
Aditya-Kumar-Code Apr 25, 2024
9b78f1a
Delete .DS_Store
Aditya-Kumar-Code Apr 25, 2024
50c2690
chore: remove pycache artifacts
sutyum Apr 25, 2024
6cc663d
examples added
Aditya-Kumar-Code Apr 25, 2024
a2667aa
Update abdm.yml
Aditya-Kumar-Code Apr 25, 2024
9fbc7a9
ruff
Aditya-Kumar-Code Apr 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
sutyum marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,8 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

#unnecessary files
.tox.ini
.DS_Store
git_push.sh
128 changes: 126 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,126 @@
# ABDM-HIU-py
SDK for ABDM HIU
# abdm-hiu-sdk
ABDM Health Information User API'S for handling consent and health information requests.

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.0.0
- Package version: 1.0.0
- Generator version: 7.5.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.

Python 3.7+

## Installation & Usage
### pip install

the python package is hosted on a repository, you can install directly using:

```sh
pip install git+https://github.com/Technoculture/ABDM-HIU-SDK
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/Technoculture/ABDM-HIU-SDK`)

Then import the package:
```python
import abdm-hiu-sdk
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import abdm-hiu-sdk
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

import abdm-hiu-sdk
from abdm-hiu-sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://example.com
# See configuration.py for a list of all supported configuration parameters.
configuration = abdm-hiu-sdk.Configuration(
host = "https://example.com"
)



# Enter a context with an instance of the API client
with abdm-hiu-sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = abdm-hiu-sdk.DefaultAPI(api_client)

try:
# Notify HIU of consent changes via gateway
api_response = api_instance.gateway_consent_request_notify()
print("The response of DefaultAPI->gateway_consent_request_notify:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultAPI->gateway_consent_request_notify: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *https://sandbox.abdm.gov.in/*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultAPI* | [**gateway_consent_request_notify**](docs/DefaultAPI.md#gateway_consent_request_notify) | **POST** /your_gateway_callback_url_prefix/consents/hiu/notify | Notify HIU of consent changes via gateway
*DefaultAPI* | [**gateway_consent_request_on_fetch**](docs/DefaultAPI.md#gateway_consent_request_on_fetch) | **POST** /your_gateway_callback_url_prefix/consents/on-fetch | Fetch consents from gateway
*DefaultAPI* | [**gateway_consent_request_on_init**](docs/DefaultAPI.md#gateway_consent_request_on_init) | **POST** /your_gateway_callback_url_prefix/consent-requests/on-init | Handle gateway consent request initialization
*DefaultAPI* | [**gateway_health_information_on_request**](docs/DefaultAPI.md#gateway_health_information_on_request) | **POST** /your_gateway_callback_url_prefix/health-information/hiu/on-request | Handle gateway health information request
*DefaultAPI* | [**generate_consent_request**](docs/DefaultAPI.md#generate_consent_request) | **POST** /api/hiu/generate_consent_request | Generate a new consent request
*DefaultAPI* | [**list_consent_artefacts**](docs/DefaultAPI.md#list_consent_artefacts) | **GET** /api/hiu/consent_artefacts | List consent artefacts
*DefaultAPI* | [**list_consents**](docs/DefaultAPI.md#list_consents) | **GET** /api/hiu/consents | List all consents
*DefaultAPI* | [**receive_health_information**](docs/DefaultAPI.md#receive_health_information) | **POST** /api/hiu/health-information/receive | Receive health information
*DefaultAPI* | [**request_health_information**](docs/DefaultAPI.md#request_health_information) | **POST** /api/hiu/health-information/request | Request health information
*DefaultAPI* | [**retrieve_consent**](docs/DefaultAPI.md#retrieve_consent) | **GET** /api/hiu/consents/{pk} | Retrieve a specific consent
*DefaultAPI* | [**retrieve_consent_artefact**](docs/DefaultAPI.md#retrieve_consent_artefact) | **GET** /api/hiu/consent_artefacts/{pk} | Retrieve a specific consent artefact


## Documentation For Models

- [GatewayConsentRequestNotify200ResponseModel](docs/GatewayConsentRequestNotify200ResponseModel.md)
- [GatewayConsentRequestOnFetch200ResponseModel](docs/GatewayConsentRequestOnFetch200ResponseModel.md)
- [GatewayConsentRequestOnInit200ResponseModel](docs/GatewayConsentRequestOnInit200ResponseModel.md)
- [GatewayHealthInformationOnRequest200ResponseModel](docs/GatewayHealthInformationOnRequest200ResponseModel.md)
- [GenerateConsentRequest200ResponseModel](docs/GenerateConsentRequest200ResponseModel.md)
- [ListConsentArtefacts200ResponseModel](docs/ListConsentArtefacts200ResponseModel.md)
- [ListConsents200ResponseModel](docs/ListConsents200ResponseModel.md)
- [ReceiveHealthInformation200ResponseModel](docs/ReceiveHealthInformation200ResponseModel.md)
- [RequestHealthInformation200ResponseModel](docs/RequestHealthInformation200ResponseModel.md)
- [RetrieveConsent200ResponseConsentModel](docs/RetrieveConsent200ResponseConsentModel.md)
- [RetrieveConsent200ResponseModel](docs/RetrieveConsent200ResponseModel.md)
- [RetrieveConsentArtefact200ResponseModel](docs/RetrieveConsentArtefact200ResponseModel.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization

Endpoints do not require authorization.


## Author




45 changes: 45 additions & 0 deletions abdm-hiu-sdk/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# coding: utf-8

# flake8: noqa

"""
HIU API SDK

Health Information User API for handling consent and health information requests.

The version of the OpenAPI document: 1.0.0
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
""" # noqa: E501


__version__ = "1.0.0"

# import apis into sdk package
from abdm-hiu-sdk.api.default_api import DefaultAPI

# import ApiClient
from abdm-hiu-sdk.api_response import ApiResponse
sutyum marked this conversation as resolved.
Show resolved Hide resolved
from abdm-hiu-sdk.api_client import ApiClient
from abdm-hiu-sdk.configuration import Configuration
from abdm-hiu-sdk.exceptions import OpenApiException
from abdm-hiu-sdk.exceptions import ApiTypeError
from abdm-hiu-sdk.exceptions import ApiValueError
from abdm-hiu-sdk.exceptions import ApiKeyError
from abdm-hiu-sdk.exceptions import ApiAttributeError
from abdm-hiu-sdk.exceptions import ApiException

# import models into sdk package
from abdm-hiu-sdk.abdm-hiu-sdk.model.gateway_consent_request_notify200_response_model import GatewayConsentRequestNotify200ResponseModel
from abdm-hiu-sdk.abdm-hiu-sdk.model.gateway_consent_request_on_fetch200_response_model import GatewayConsentRequestOnFetch200ResponseModel
from abdm-hiu-sdk.abdm-hiu-sdk.model.gateway_consent_request_on_init200_response_model import GatewayConsentRequestOnInit200ResponseModel
from abdm-hiu-sdk.abdm-hiu-sdk.model.gateway_health_information_on_request200_response_model import GatewayHealthInformationOnRequest200ResponseModel
from abdm-hiu-sdk.abdm-hiu-sdk.model.generate_consent_request200_response_model import GenerateConsentRequest200ResponseModel
from abdm-hiu-sdk.abdm-hiu-sdk.model.list_consent_artefacts200_response_model import ListConsentArtefacts200ResponseModel
from abdm-hiu-sdk.abdm-hiu-sdk.model.list_consents200_response_model import ListConsents200ResponseModel
from abdm-hiu-sdk.abdm-hiu-sdk.model.receive_health_information200_response_model import ReceiveHealthInformation200ResponseModel
from abdm-hiu-sdk.abdm-hiu-sdk.model.request_health_information200_response_model import RequestHealthInformation200ResponseModel
from abdm-hiu-sdk.abdm-hiu-sdk.model.retrieve_consent200_response_consent_model import RetrieveConsent200ResponseConsentModel
from abdm-hiu-sdk.abdm-hiu-sdk.model.retrieve_consent200_response_model import RetrieveConsent200ResponseModel
from abdm-hiu-sdk.abdm-hiu-sdk.model.retrieve_consent_artefact200_response_model import RetrieveConsentArtefact200ResponseModel
5 changes: 5 additions & 0 deletions abdm-hiu-sdk/abdm-hiu-sdk/api/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# flake8: noqa

# import apis into api package
from abdm-hiu-sdk.api.default_api import DefaultAPI

Loading