Skip to content

Commit

Permalink
Release 0.1.0: Nested groups, subscription and commands
Browse files Browse the repository at this point in the history
  • Loading branch information
tarun91vas committed Oct 5, 2020
1 parent fe4217d commit f7e71d3
Show file tree
Hide file tree
Showing 42 changed files with 3,092 additions and 362 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Esper provides a Python client library to communicate with the Esper APIs to pro


- API version: 1.0.0
- Package version: 0.0.15
- Package version: 0.1.0


## Requirements.
Expand Down Expand Up @@ -94,7 +94,6 @@ Class | Method | HTTP request
*CommandsV2Api* | [**get_command_request_status**](docs/CommandsV2Api.md#get_command_request_status) | **GET** /v0/enterprise/{enterprise_id}/command/{request_id}/status/
*CommandsV2Api* | [**get_device_command_history**](docs/CommandsV2Api.md#get_device_command_history) | **GET** /v0/enterprise/{enterprise_id}/device/{device_id}/command-history/
*CommandsV2Api* | [**list_command_request**](docs/CommandsV2Api.md#list_command_request) | **GET** /v0/enterprise/{enterprise_id}/command/
*CommandsV2Api* | [**partial_update_command_status**](docs/CommandsV2Api.md#partial_update_command_status) | **PATCH** /v0/enterprise/{enterprise_id}/command/{request_id}/status/{command_id}/
*DeviceApi* | [**get_all_devices**](docs/DeviceApi.md#get_all_devices) | **GET** /enterprise/{enterprise_id}/device/
*DeviceApi* | [**get_app_installs**](docs/DeviceApi.md#get_app_installs) | **GET** /enterprise/{enterprise_id}/device/{device_id}/install/
*DeviceApi* | [**get_device_app_by_id**](docs/DeviceApi.md#get_device_app_by_id) | **GET** /enterprise/{enterprise_id}/device/{device_id}/app/{app_id}/
Expand Down Expand Up @@ -123,6 +122,10 @@ Class | Method | HTTP request
*GeofenceApi* | [**update_geofence**](docs/GeofenceApi.md#update_geofence) | **PUT** /v0/enterprise/{enterprise_id}/geofence/{geofence_id}/
*GroupCommandsApi* | [**get_group_command**](docs/GroupCommandsApi.md#get_group_command) | **GET** /enterprise/{enterprise_id}/devicegroup/{group_id}/command/{command_id}/
*GroupCommandsApi* | [**run_group_command**](docs/GroupCommandsApi.md#run_group_command) | **POST** /enterprise/{enterprise_id}/devicegroup/{group_id}/command/
*SubscriptionApi* | [**create_subscription**](docs/SubscriptionApi.md#create_subscription) | **POST** /v0/enterprise/{enterprise_id}/subscription/
*SubscriptionApi* | [**delete_subscription**](docs/SubscriptionApi.md#delete_subscription) | **DELETE** /v0/enterprise/{enterprise_id}/subscription/{subscription_id}/
*SubscriptionApi* | [**get_all_subscriptions**](docs/SubscriptionApi.md#get_all_subscriptions) | **GET** /v0/enterprise/{enterprise_id}/subscription/
*SubscriptionApi* | [**get_subscription**](docs/SubscriptionApi.md#get_subscription) | **GET** /v0/enterprise/{enterprise_id}/subscription/{subscription_id}/
*TokenApi* | [**get_token_info**](docs/TokenApi.md#get_token_info) | **GET** /v1/token-info/
*TokenApi* | [**renew_token**](docs/TokenApi.md#renew_token) | **POST** /v0/enterprise/{enterprise_id}/developerapp/{developerapp_id}/renew-token/

Expand All @@ -143,6 +146,7 @@ Class | Method | HTTP request
- [DeviceAppPermission](docs/DeviceAppPermission.md)
- [DeviceCommand](docs/DeviceCommand.md)
- [DeviceGroup](docs/DeviceGroup.md)
- [DeviceGroupPartialUpdate](docs/DeviceGroupPartialUpdate.md)
- [DeviceGroupUpdate](docs/DeviceGroupUpdate.md)
- [DeviceStatus](docs/DeviceStatus.md)
- [EmmDevice](docs/EmmDevice.md)
Expand All @@ -153,8 +157,11 @@ Class | Method | HTTP request
- [EnterprisePolicyDataFrpGoogles](docs/EnterprisePolicyDataFrpGoogles.md)
- [EnterprisePolicyDataGoogleAccountPermission](docs/EnterprisePolicyDataGoogleAccountPermission.md)
- [EnterprisePolicyDataPhonePolicy](docs/EnterprisePolicyDataPhonePolicy.md)
- [EnterprisePolicyPartialUpdate](docs/EnterprisePolicyPartialUpdate.md)
- [EnterpriseUpdateV1](docs/EnterpriseUpdateV1.md)
- [EnterpriseV1](docs/EnterpriseV1.md)
- [EventSubscription](docs/EventSubscription.md)
- [EventSubscriptionArgs](docs/EventSubscriptionArgs.md)
- [Geofence](docs/Geofence.md)
- [GeofenceUpdate](docs/GeofenceUpdate.md)
- [GoogleEMM](docs/GoogleEMM.md)
Expand All @@ -165,6 +172,7 @@ Class | Method | HTTP request
- [InlineResponse2001](docs/InlineResponse2001.md)
- [InlineResponse20010](docs/InlineResponse20010.md)
- [InlineResponse20011](docs/InlineResponse20011.md)
- [InlineResponse20012](docs/InlineResponse20012.md)
- [InlineResponse2002](docs/InlineResponse2002.md)
- [InlineResponse2003](docs/InlineResponse2003.md)
- [InlineResponse2004](docs/InlineResponse2004.md)
Expand All @@ -182,8 +190,6 @@ Class | Method | HTTP request
- [V0CommandRequestStatus](docs/V0CommandRequestStatus.md)
- [V0CommandScheduleArgs](docs/V0CommandScheduleArgs.md)
- [V0CommandStatus](docs/V0CommandStatus.md)
- [V0CommandStatusUpdate](docs/V0CommandStatusUpdate.md)
- [V0CommandStatusUpdateDetails](docs/V0CommandStatusUpdateDetails.md)


## Documentation For Enums
Expand Down
60 changes: 0 additions & 60 deletions docs/CommandsV2Api.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Method | HTTP request | Description
[**get_command_request_status**](CommandsV2Api.md#get_command_request_status) | **GET** /v0/enterprise/{enterprise_id}/command/{request_id}/status/ | get status list for command request
[**get_device_command_history**](CommandsV2Api.md#get_device_command_history) | **GET** /v0/enterprise/{enterprise_id}/device/{device_id}/command-history/ | get command history for device
[**list_command_request**](CommandsV2Api.md#list_command_request) | **GET** /v0/enterprise/{enterprise_id}/command/ | List command requests
[**partial_update_command_status**](CommandsV2Api.md#partial_update_command_status) | **PATCH** /v0/enterprise/{enterprise_id}/command/{request_id}/status/{command_id}/ | Update command status


# **create_command**
Expand Down Expand Up @@ -237,62 +236,3 @@ Name | Type | Description | Notes

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **partial_update_command_status**
> V0CommandStatus partial_update_command_status(enterprise_id, request_id, command_id, action, data=data)
Update command status

API to patch the state of command

### Example
```python
import esperclient
from esperclient.rest import ApiException

# Configure API key authorization: apiKey
configuration = esperclient.Configuration()
configuration.host = 'SERVER_URL'
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = esperclient.CommandsV2Api(esperclient.ApiClient(configuration))
enterprise_id = 'enterprise_id_example' # str | ID of the enterprise
request_id = 'request_id_example' # str | ID for the command request
command_id = 'command_id_example' # str | ID for the command
action = 'action_example' # str | Action to be performed on device
data = esperclient.V0CommandStatusUpdate() # V0CommandStatusUpdate | (optional)

try:
# Update command status
api_response = api_instance.partial_update_command_status(enterprise_id, request_id, command_id, action, data=data)
print(api_response)
except ApiException as e:
print("Exception when calling CommandsV2Api->partial_update_command_status: %s\n" % e)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**enterprise_id** | [**str**](.md)| ID of the enterprise |
**request_id** | [**str**](.md)| ID for the command request |
**command_id** | [**str**](.md)| ID for the command |
**action** | **str**| Action to be performed on device |
**data** | [**V0CommandStatusUpdate**](V0CommandStatusUpdate.md)| | [optional]

### Return type

[**V0CommandStatus**](V0CommandStatus.md)

### Authorization

[apiKey](../README.md#apiKey)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

13 changes: 8 additions & 5 deletions docs/DeviceGroup.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | | [optional]
**device_count** | **int** | | [optional]
**name** | **str** | |
**created_on** | **datetime** | | [optional]
**enterprise** | **str** | | [optional]
**id** | **str** | Group id | [optional]
**name** | **str** | Group name |
**created_on** | **datetime** | Date and time of when the group was created | [optional]
**enterprise** | **str** | Enterprise url | [optional]
**parent** | **str** | Parent group url | [optional]
**device_count** | **int** | Count of devices in the group | [optional]
**path** | **str** | Path of the group | [optional]
**children_count** | **int** | Count of child groups | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
24 changes: 14 additions & 10 deletions docs/DeviceGroupApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = esperclient.DeviceGroupApi(esperclient.ApiClient(configuration))
enterprise_id = 'enterprise_id_example' # str | A UUID string identifying enterprise.
data = esperclient.DeviceGroup() # DeviceGroup |
data = esperclient.DeviceGroupUpdate() # DeviceGroupUpdate |

try:
# Create a device group
Expand All @@ -48,7 +48,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**enterprise_id** | **str**| A UUID string identifying enterprise. |
**data** | [**DeviceGroup**](DeviceGroup.md)| |
**data** | [**DeviceGroupUpdate**](DeviceGroupUpdate.md)| |

### Return type

Expand Down Expand Up @@ -138,7 +138,7 @@ configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = esperclient.DeviceGroupApi(esperclient.ApiClient(configuration))
enterprise_id = 'enterprise_id_example' # str | A UUID string identifying enterprise.
name = 'name_example' # str | filter by group name (optional)
name = 'name_example' # str | Filter by group name (optional)
limit = 20 # int | Number of results to return per page. (optional) (default to 20)
offset = 0 # int | The initial index from which to return the results. (optional) (default to 0)

Expand All @@ -155,7 +155,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**enterprise_id** | **str**| A UUID string identifying enterprise. |
**name** | **str**| filter by group name | [optional]
**name** | **str**| Filter by group name | [optional]
**limit** | **int**| Number of results to return per page. | [optional] [default to 20]
**offset** | **int**| The initial index from which to return the results. | [optional] [default to 0]

Expand Down Expand Up @@ -228,7 +228,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **partial_update_group**
> DeviceGroup partial_update_group(group_id, enterprise_id, data)
> DeviceGroup partial_update_group(group_id, enterprise_id, data, action=action)
Partial update group

Expand All @@ -249,11 +249,12 @@ configuration.api_key_prefix['Authorization'] = 'Bearer'
api_instance = esperclient.DeviceGroupApi(esperclient.ApiClient(configuration))
group_id = 'group_id_example' # str | A UUID string identifying this enterprise device group.
enterprise_id = 'enterprise_id_example' # str | A UUID string identifying enterprise.
data = esperclient.DeviceGroupUpdate() # DeviceGroupUpdate |
data = esperclient.DeviceGroupPartialUpdate() # DeviceGroupPartialUpdate |
action = 'action_example' # str | add / remove / rename / move (optional)

try:
# Partial update group
api_response = api_instance.partial_update_group(group_id, enterprise_id, data)
api_response = api_instance.partial_update_group(group_id, enterprise_id, data, action=action)
print(api_response)
except ApiException as e:
print("Exception when calling DeviceGroupApi->partial_update_group: %s\n" % e)
Expand All @@ -265,7 +266,8 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**group_id** | [**str**](.md)| A UUID string identifying this enterprise device group. |
**enterprise_id** | **str**| A UUID string identifying enterprise. |
**data** | [**DeviceGroupUpdate**](DeviceGroupUpdate.md)| |
**data** | [**DeviceGroupPartialUpdate**](DeviceGroupPartialUpdate.md)| |
**action** | **str**| add / remove / rename / move | [optional]

### Return type

Expand All @@ -283,7 +285,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **update_group**
> DeviceGroup update_group(group_id, enterprise_id, data)
> DeviceGroup update_group(group_id, enterprise_id, data, action=action)
Update device group

Expand All @@ -305,10 +307,11 @@ api_instance = esperclient.DeviceGroupApi(esperclient.ApiClient(configuration))
group_id = 'group_id_example' # str | A UUID string identifying this enterprise device group.
enterprise_id = 'enterprise_id_example' # str | A UUID string identifying enterprise.
data = esperclient.DeviceGroupUpdate() # DeviceGroupUpdate |
action = 'action_example' # str | add / remove / rename / move (optional)

try:
# Update device group
api_response = api_instance.update_group(group_id, enterprise_id, data)
api_response = api_instance.update_group(group_id, enterprise_id, data, action=action)
print(api_response)
except ApiException as e:
print("Exception when calling DeviceGroupApi->update_group: %s\n" % e)
Expand All @@ -321,6 +324,7 @@ Name | Type | Description | Notes
**group_id** | [**str**](.md)| A UUID string identifying this enterprise device group. |
**enterprise_id** | **str**| A UUID string identifying enterprise. |
**data** | [**DeviceGroupUpdate**](DeviceGroupUpdate.md)| |
**action** | **str**| add / remove / rename / move | [optional]

### Return type

Expand Down
21 changes: 21 additions & 0 deletions docs/DeviceGroupPartialUpdate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# DeviceGroupPartialUpdate
> esperclient.models.device_group_partial_update
### Description

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | Group id | [optional]
**name** | **str** | Group name | [optional]
**created_on** | **datetime** | Date and time of when the group was created | [optional]
**enterprise** | **str** | Enterprise url | [optional]
**parent** | **str** | Parent group id | [optional]
**device_ids** | **list[str]** | Device ids | [optional]
**device_count** | **int** | Count of devices in the group | [optional]
**path** | **str** | Path of the group | [optional]
**children_count** | **int** | Count of child groups | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


13 changes: 8 additions & 5 deletions docs/DeviceGroupUpdate.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | | [optional]
**device_ids** | **list[str]** | | [optional]
**id** | **str** | Group id | [optional]
**name** | **str** | Group name |
**created_on** | **datetime** | Date and time of when the group was created | [optional]
**enterprise** | **str** | Enterprise url | [optional]
**parent** | **str** | Parent group id | [optional]
**device_ids** | **list[str]** | Devices ids | [optional]
**device_count** | **int** | | [optional]
**name** | **str** | | [optional]
**created_on** | **datetime** | | [optional]
**enterprise** | **str** | | [optional]
**path** | **str** | Path of the group | [optional]
**children_count** | **int** | Count of child groups | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
7 changes: 4 additions & 3 deletions docs/EnterprisePolicy.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | Unique Policy identifier | [optional]
**uuid** | **str** | Unique Policy identifier | [optional]
**enterprise** | **str** | Url of the enterprise resource |
**url** | **str** | URL link to policy | [optional]
**name** | **str** | Name of the Policy | [optional]
**name** | **str** | Name of the Policy |
**description** | **str** | Details regarding the Policy | [optional]
**device_count** | **int** | Count of Devices with this policy applied | [optional]
**policy** | [**EnterprisePolicyData**](EnterprisePolicyData.md) | | [optional]
**google_policy_id** | **str** | Id of the Google policy | [optional]
**policy** | [**EnterprisePolicyData**](EnterprisePolicyData.md) | |
**updated_on** | **datetime** | Last-Updated Timestamp of Policy | [optional]
**created_on** | **datetime** | Creation Timestamp of Policy | [optional]
**is_active** | **bool** | Is this policy currently active | [optional]
Expand Down
4 changes: 2 additions & 2 deletions docs/EnterprisePolicyApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ configuration.api_key_prefix['Authorization'] = 'Bearer'
api_instance = esperclient.EnterprisePolicyApi(esperclient.ApiClient(configuration))
policy_id = 56 # int | An integer identifying this EnterprisePolicy.
enterprise_id = 'enterprise_id_example' # str | A UUID string identifying enterprise.
data = esperclient.EnterprisePolicy() # EnterprisePolicy |
data = esperclient.EnterprisePolicyPartialUpdate() # EnterprisePolicyPartialUpdate |

try:
# Partial update EnterprisePolicy
Expand All @@ -267,7 +267,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**policy_id** | **int**| An integer identifying this EnterprisePolicy. |
**enterprise_id** | **str**| A UUID string identifying enterprise. |
**data** | [**EnterprisePolicy**](EnterprisePolicy.md)| |
**data** | [**EnterprisePolicyPartialUpdate**](EnterprisePolicyPartialUpdate.md)| |

### Return type

Expand Down
23 changes: 23 additions & 0 deletions docs/EnterprisePolicyPartialUpdate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# EnterprisePolicyPartialUpdate
> esperclient.models.enterprise_policy_partial_update
### Description

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**uuid** | **str** | Unique Policy identifier | [optional]
**enterprise** | **str** | Url of the enterprise resource | [optional]
**url** | **str** | URL link to policy | [optional]
**name** | **str** | Name of the Policy | [optional]
**description** | **str** | Details regarding the Policy | [optional]
**device_count** | **int** | Count of Devices with this policy applied | [optional]
**policy** | [**EnterprisePolicyData**](EnterprisePolicyData.md) | | [optional]
**updated_on** | **datetime** | Last-Updated Timestamp of Policy | [optional]
**created_on** | **datetime** | Creation Timestamp of Policy | [optional]
**is_active** | **bool** | Is this policy currently active | [optional]
**google_policy_id** | **str** | Id of the Google policy | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


19 changes: 19 additions & 0 deletions docs/EventSubscription.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# EventSubscription
> esperclient.models.event_subscription
### Description

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | | [optional]
**aws_account_id** | **str** | |
**sns_topic_arn** | **str** | | [optional]
**created_on** | **datetime** | | [optional]
**updated_on** | **datetime** | | [optional]
**is_subscribed** | **bool** | | [optional]
**enterprise** | **str** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


13 changes: 13 additions & 0 deletions docs/EventSubscriptionArgs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# EventSubscriptionArgs
> esperclient.models.event_subscription_args
### Description

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**aws_account_id** | **str** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


Loading

0 comments on commit f7e71d3

Please sign in to comment.