Metadata-Version: 2.1
Name: sensorpush-api
Version: 1.0.0
Summary: SensorPush Public API
Home-page: https://www.sensorpush.com/gateway-cloud-api
Author-email: support@sensorpush.com
License: SensorPush License
Keywords: Swagger,SensorPush Public API
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Description-Content-Type: text/markdown
Requires-Dist: certifi >=14.05.14
Requires-Dist: six >=1.10
Requires-Dist: python-dateutil >=2.5.3
Requires-Dist: setuptools >=21.0.0
Requires-Dist: urllib3 >=1.15.1
Provides-Extra: release
Requires-Dist: build >=0.3.0 ; extra == 'release'
Provides-Extra: test
Requires-Dist: coverage >=4.0.3 ; extra == 'test'
Requires-Dist: nose >=1.3.7 ; extra == 'test'
Requires-Dist: pluggy >=0.3.1 ; extra == 'test'
Requires-Dist: py >=1.4.31 ; extra == 'test'
Requires-Dist: randomize >=0.13 ; extra == 'test'

# sensorpush-api
This is a swagger definition for the SensorPush public REST API. Download the definition file [here](https://api.sensorpush.com/api/v1/support/swagger/swagger-v1.json).

This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: v1.0.20240629
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen

## Requirements.

Python 2.7 and 3.4+

## Installation & Usage
### pip install

If the python package is hosted on Github, you can install directly from Github

```sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)

Then import the package:
```python
import sensorpush_api 
```

### 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 sensorpush_api
```

## Getting Started

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

```python
from __future__ import print_function
import time
import sensorpush_api
from sensorpush_api.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = sensorpush_api.ApiApi(sensorpush_api.ApiClient(configuration))
body = sensorpush_api.AccessTokenRequest() # AccessTokenRequest | 

try:
    # Request a temporary oAuth access code.
    api_response = api_instance.access_token(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ApiApi->access_token: %s\n" % e)

# Configure API key authorization: oauth
configuration = sensorpush_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = sensorpush_api.ApiApi(sensorpush_api.ApiClient(configuration))
body = sensorpush_api.ReportsRequest() # ReportsRequest | 

try:
    # Download bulk reports.
    api_instance.download(body)
except ApiException as e:
    print("Exception when calling ApiApi->download: %s\n" % e)

# Configure API key authorization: oauth
configuration = sensorpush_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = sensorpush_api.ApiApi(sensorpush_api.ApiClient(configuration))
body = sensorpush_api.GatewaysRequest() # GatewaysRequest | 

try:
    # Lists all gateways.
    api_response = api_instance.gateways(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ApiApi->gateways: %s\n" % e)

# Configure API key authorization: oauth
configuration = sensorpush_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = sensorpush_api.ApiApi(sensorpush_api.ApiClient(configuration))
body = sensorpush_api.ReportsRequest() # ReportsRequest | 

try:
    # Lists reports available for download.
    api_response = api_instance.list(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ApiApi->list: %s\n" % e)

# create an instance of the API class
api_instance = sensorpush_api.ApiApi(sensorpush_api.ApiClient(configuration))
body = sensorpush_api.AuthorizeRequest() # AuthorizeRequest | 

try:
    # Sign in and request an authorization code
    api_response = api_instance.oauth_authorize_post(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ApiApi->oauth_authorize_post: %s\n" % e)

# create an instance of the API class
api_instance = sensorpush_api.ApiApi(sensorpush_api.ApiClient(configuration))

try:
    # SensorPush API status
    api_response = api_instance.root_post()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ApiApi->root_post: %s\n" % e)

# Configure API key authorization: oauth
configuration = sensorpush_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = sensorpush_api.ApiApi(sensorpush_api.ApiClient(configuration))
body = sensorpush_api.SamplesRequest() # SamplesRequest | 

try:
    # Queries for sensor samples.
    api_response = api_instance.samples(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ApiApi->samples: %s\n" % e)

# Configure API key authorization: oauth
configuration = sensorpush_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = sensorpush_api.ApiApi(sensorpush_api.ApiClient(configuration))
body = sensorpush_api.SensorsRequest() # SensorsRequest | 

try:
    # Lists all sensors.
    api_response = api_instance.sensors(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ApiApi->sensors: %s\n" % e)

# Configure API key authorization: oauth
configuration = sensorpush_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = sensorpush_api.ApiApi(sensorpush_api.ApiClient(configuration))
body = sensorpush_api.TagsRequest() # TagsRequest | 

try:
    # Updates tags on devices.
    api_response = api_instance.tags_response(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ApiApi->tags_response: %s\n" % e)

# create an instance of the API class
api_instance = sensorpush_api.ApiApi(sensorpush_api.ApiClient(configuration))
body = sensorpush_api.TokenRequest() # TokenRequest | 

try:
    # oAuth 2.0 for authorization, access, and refresh tokens
    api_response = api_instance.token(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ApiApi->token: %s\n" % e)
```

## Documentation for API Endpoints

All URIs are relative to *https://api.sensorpush.com/api/v1*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*ApiApi* | [**access_token**](docs/ApiApi.md#access_token) | **POST** /oauth/accesstoken | Request a temporary oAuth access code.
*ApiApi* | [**download**](docs/ApiApi.md#download) | **POST** /reports/download | Download bulk reports.
*ApiApi* | [**gateways**](docs/ApiApi.md#gateways) | **POST** /devices/gateways | Lists all gateways.
*ApiApi* | [**list**](docs/ApiApi.md#list) | **POST** /reports/list | Lists reports available for download.
*ApiApi* | [**oauth_authorize_post**](docs/ApiApi.md#oauth_authorize_post) | **POST** /oauth/authorize | Sign in and request an authorization code
*ApiApi* | [**root_post**](docs/ApiApi.md#root_post) | **POST** / | SensorPush API status
*ApiApi* | [**samples**](docs/ApiApi.md#samples) | **POST** /samples | Queries for sensor samples.
*ApiApi* | [**sensors**](docs/ApiApi.md#sensors) | **POST** /devices/sensors | Lists all sensors.
*ApiApi* | [**tags_response**](docs/ApiApi.md#tags_response) | **POST** /tags | Updates tags on devices.
*ApiApi* | [**token**](docs/ApiApi.md#token) | **POST** /oauth/token | oAuth 2.0 for authorization, access, and refresh tokens

## Documentation For Models

 - [AccessTokenRequest](docs/AccessTokenRequest.md)
 - [AccessTokenResponse](docs/AccessTokenResponse.md)
 - [AuthorizeRequest](docs/AuthorizeRequest.md)
 - [AuthorizeResponse](docs/AuthorizeResponse.md)
 - [Error](docs/Error.md)
 - [Gateway](docs/Gateway.md)
 - [Gateways](docs/Gateways.md)
 - [GatewaysRequest](docs/GatewaysRequest.md)
 - [ListResponse](docs/ListResponse.md)
 - [ReportListing](docs/ReportListing.md)
 - [ReportsRequest](docs/ReportsRequest.md)
 - [Sample](docs/Sample.md)
 - [Samples](docs/Samples.md)
 - [SamplesRequest](docs/SamplesRequest.md)
 - [Sensor](docs/Sensor.md)
 - [SensorAlerts](docs/SensorAlerts.md)
 - [SensorAlertsHumidity](docs/SensorAlertsHumidity.md)
 - [SensorAlertsTemperature](docs/SensorAlertsTemperature.md)
 - [SensorCalibration](docs/SensorCalibration.md)
 - [Sensors](docs/Sensors.md)
 - [SensorsRequest](docs/SensorsRequest.md)
 - [Status](docs/Status.md)
 - [Tags](docs/Tags.md)
 - [TagsRequest](docs/TagsRequest.md)
 - [TagsResponse](docs/TagsResponse.md)
 - [TokenRequest](docs/TokenRequest.md)
 - [TokenResponse](docs/TokenResponse.md)

## Documentation For Authorization


## oauth

- **Type**: API key
- **API key parameter name**: Authorization
- **Location**: HTTP header


## Author

support@sensorpush.com
