Skip to content

Commit 1594ef4

Browse files
author
Phrase
committed
1 parent 1a457dc commit 1594ef4

File tree

10 files changed

+1073
-0
lines changed

10 files changed

+1073
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,9 @@ Class | Method | HTTP request | Description
339339
*VariablesApi* | [**variables_list**](docs/VariablesApi.md#variables_list) | **GET** /projects/{project_id}/variables | List variables
340340
*VersionsHistoryApi* | [**version_show**](docs/VersionsHistoryApi.md#version_show) | **GET** /projects/{project_id}/translations/{translation_id}/versions/{id} | Get a single version
341341
*VersionsHistoryApi* | [**versions_list**](docs/VersionsHistoryApi.md#versions_list) | **GET** /projects/{project_id}/translations/{translation_id}/versions | List all versions
342+
*WebhookDeliveriesApi* | [**webhook_deliveries_list**](docs/WebhookDeliveriesApi.md#webhook_deliveries_list) | **GET** /projects/{project_id}/webhooks/{webhook_id}/deliveries | List webhook deliveries
343+
*WebhookDeliveriesApi* | [**webhook_deliveries_redeliver**](docs/WebhookDeliveriesApi.md#webhook_deliveries_redeliver) | **POST** /projects/{project_id}/webhooks/{webhook_id}/deliveries/{id}/redeliver | Redeliver a single webhook delivery
344+
*WebhookDeliveriesApi* | [**webhook_deliveries_show**](docs/WebhookDeliveriesApi.md#webhook_deliveries_show) | **GET** /projects/{project_id}/webhooks/{webhook_id}/deliveries/{id} | Get a single webhook delivery
342345
*WebhooksApi* | [**webhook_create**](docs/WebhooksApi.md#webhook_create) | **POST** /projects/{project_id}/webhooks | Create a webhook
343346
*WebhooksApi* | [**webhook_delete**](docs/WebhooksApi.md#webhook_delete) | **DELETE** /projects/{project_id}/webhooks/{id} | Delete a webhook
344347
*WebhooksApi* | [**webhook_show**](docs/WebhooksApi.md#webhook_show) | **GET** /projects/{project_id}/webhooks/{id} | Get a single webhook
@@ -540,6 +543,7 @@ Class | Method | HTTP request | Description
540543
- [VariableUpdateParameters](docs/VariableUpdateParameters.md)
541544
- [Webhook](docs/Webhook.md)
542545
- [WebhookCreateParameters](docs/WebhookCreateParameters.md)
546+
- [WebhookDelivery](docs/WebhookDelivery.md)
543547
- [WebhookUpdateParameters](docs/WebhookUpdateParameters.md)
544548

545549

docs/WebhookDeliveriesApi.md

Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
# phrase_api.WebhookDeliveriesApi
2+
3+
All URIs are relative to *https://api.phrase.com/v2*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**webhook_deliveries_list**](WebhookDeliveriesApi.md#webhook_deliveries_list) | **GET** /projects/{project_id}/webhooks/{webhook_id}/deliveries | List webhook deliveries
8+
[**webhook_deliveries_redeliver**](WebhookDeliveriesApi.md#webhook_deliveries_redeliver) | **POST** /projects/{project_id}/webhooks/{webhook_id}/deliveries/{id}/redeliver | Redeliver a single webhook delivery
9+
[**webhook_deliveries_show**](WebhookDeliveriesApi.md#webhook_deliveries_show) | **GET** /projects/{project_id}/webhooks/{webhook_id}/deliveries/{id} | Get a single webhook delivery
10+
11+
12+
# **webhook_deliveries_list**
13+
> list[WebhookDelivery] webhook_deliveries_list(project_id, webhook_id, x_phrase_app_otp=x_phrase_app_otp, response_status_codes=response_status_codes)
14+
15+
List webhook deliveries
16+
17+
List all webhook deliveries for the given webhook_id.
18+
19+
### Example
20+
21+
```python
22+
from __future__ import print_function
23+
import time
24+
import phrase_api
25+
from phrase_api.rest import ApiException
26+
from pprint import pprint
27+
28+
configuration = phrase_api.Configuration()
29+
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
30+
configuration.api_key_prefix['Authorization'] = 'token'
31+
32+
# Enter a context with an instance of the API client
33+
with phrase_api.ApiClient(configuration) as api_client:
34+
# Create an instance of the API class
35+
api_instance = phrase_api.WebhookDeliveriesApi(api_client)
36+
project_id = 'project_id_example' # str | Project ID (required)
37+
webhook_id = 'webhook_id_example' # str | Webhook ID (required)
38+
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
39+
response_status_codes = 'response_status_codes_example' # str | List of Response Status Codes
40+
41+
try:
42+
# List webhook deliveries
43+
api_response = api_instance.webhook_deliveries_list(project_id, webhook_id, x_phrase_app_otp=x_phrase_app_otp, response_status_codes=response_status_codes)
44+
pprint(api_response)
45+
except ApiException as e:
46+
print("Exception when calling WebhookDeliveriesApi->webhook_deliveries_list: %s\n" % e)
47+
```
48+
49+
50+
### Parameters
51+
52+
Name | Type | Description | Notes
53+
------------- | ------------- | ------------- | -------------
54+
**project_id** | **str**| Project ID |
55+
**webhook_id** | **str**| Webhook ID |
56+
**x_phrase_app_otp** | **str**| Two-Factor-Authentication token (optional) | [optional]
57+
**response_status_codes** | **str**| List of Response Status Codes | [optional]
58+
59+
### Return type
60+
61+
[**list[WebhookDelivery]**](WebhookDelivery.md)
62+
63+
### Authorization
64+
65+
[Basic](../README.md#Basic), [Token](../README.md#Token)
66+
67+
### HTTP request headers
68+
69+
- **Content-Type**: Not defined
70+
- **Accept**: application/json
71+
72+
### HTTP response details
73+
| Status code | Description | Response headers |
74+
|-------------|-------------|------------------|
75+
**200** | OK | * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> * Link - <br> |
76+
**400** | Bad request | * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> |
77+
**404** | Not Found | * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> |
78+
**429** | Rate Limiting | * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> |
79+
80+
[[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)
81+
82+
# **webhook_deliveries_redeliver**
83+
> WebhookDelivery webhook_deliveries_redeliver(project_id, webhook_id, id, x_phrase_app_otp=x_phrase_app_otp)
84+
85+
Redeliver a single webhook delivery
86+
87+
Trigger an individual webhook delivery to be redelivered.
88+
89+
### Example
90+
91+
```python
92+
from __future__ import print_function
93+
import time
94+
import phrase_api
95+
from phrase_api.rest import ApiException
96+
from pprint import pprint
97+
98+
configuration = phrase_api.Configuration()
99+
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
100+
configuration.api_key_prefix['Authorization'] = 'token'
101+
102+
# Enter a context with an instance of the API client
103+
with phrase_api.ApiClient(configuration) as api_client:
104+
# Create an instance of the API class
105+
api_instance = phrase_api.WebhookDeliveriesApi(api_client)
106+
project_id = 'project_id_example' # str | Project ID (required)
107+
webhook_id = 'webhook_id_example' # str | Webhook ID (required)
108+
id = 'id_example' # str | ID (required)
109+
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
110+
111+
try:
112+
# Redeliver a single webhook delivery
113+
api_response = api_instance.webhook_deliveries_redeliver(project_id, webhook_id, id, x_phrase_app_otp=x_phrase_app_otp)
114+
pprint(api_response)
115+
except ApiException as e:
116+
print("Exception when calling WebhookDeliveriesApi->webhook_deliveries_redeliver: %s\n" % e)
117+
```
118+
119+
120+
### Parameters
121+
122+
Name | Type | Description | Notes
123+
------------- | ------------- | ------------- | -------------
124+
**project_id** | **str**| Project ID |
125+
**webhook_id** | **str**| Webhook ID |
126+
**id** | **str**| ID |
127+
**x_phrase_app_otp** | **str**| Two-Factor-Authentication token (optional) | [optional]
128+
129+
### Return type
130+
131+
[**WebhookDelivery**](WebhookDelivery.md)
132+
133+
### Authorization
134+
135+
[Basic](../README.md#Basic), [Token](../README.md#Token)
136+
137+
### HTTP request headers
138+
139+
- **Content-Type**: Not defined
140+
- **Accept**: application/json
141+
142+
### HTTP response details
143+
| Status code | Description | Response headers |
144+
|-------------|-------------|------------------|
145+
**200** | OK | * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> * Link - <br> |
146+
**400** | Bad request | * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> |
147+
**404** | Not Found | * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> |
148+
**429** | Rate Limiting | * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> |
149+
150+
[[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)
151+
152+
# **webhook_deliveries_show**
153+
> WebhookDelivery webhook_deliveries_show(project_id, webhook_id, id, x_phrase_app_otp=x_phrase_app_otp)
154+
155+
Get a single webhook delivery
156+
157+
Get all information about a single webhook delivery for the given ID.
158+
159+
### Example
160+
161+
```python
162+
from __future__ import print_function
163+
import time
164+
import phrase_api
165+
from phrase_api.rest import ApiException
166+
from pprint import pprint
167+
168+
configuration = phrase_api.Configuration()
169+
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
170+
configuration.api_key_prefix['Authorization'] = 'token'
171+
172+
# Enter a context with an instance of the API client
173+
with phrase_api.ApiClient(configuration) as api_client:
174+
# Create an instance of the API class
175+
api_instance = phrase_api.WebhookDeliveriesApi(api_client)
176+
project_id = 'project_id_example' # str | Project ID (required)
177+
webhook_id = 'webhook_id_example' # str | Webhook ID (required)
178+
id = 'id_example' # str | ID (required)
179+
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
180+
181+
try:
182+
# Get a single webhook delivery
183+
api_response = api_instance.webhook_deliveries_show(project_id, webhook_id, id, x_phrase_app_otp=x_phrase_app_otp)
184+
pprint(api_response)
185+
except ApiException as e:
186+
print("Exception when calling WebhookDeliveriesApi->webhook_deliveries_show: %s\n" % e)
187+
```
188+
189+
190+
### Parameters
191+
192+
Name | Type | Description | Notes
193+
------------- | ------------- | ------------- | -------------
194+
**project_id** | **str**| Project ID |
195+
**webhook_id** | **str**| Webhook ID |
196+
**id** | **str**| ID |
197+
**x_phrase_app_otp** | **str**| Two-Factor-Authentication token (optional) | [optional]
198+
199+
### Return type
200+
201+
[**WebhookDelivery**](WebhookDelivery.md)
202+
203+
### Authorization
204+
205+
[Basic](../README.md#Basic), [Token](../README.md#Token)
206+
207+
### HTTP request headers
208+
209+
- **Content-Type**: Not defined
210+
- **Accept**: application/json
211+
212+
### HTTP response details
213+
| Status code | Description | Response headers |
214+
|-------------|-------------|------------------|
215+
**200** | OK | * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> * Link - <br> |
216+
**400** | Bad request | * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> |
217+
**404** | Not Found | * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> |
218+
**429** | Rate Limiting | * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> |
219+
220+
[[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)
221+

docs/WebhookDelivery.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# WebhookDelivery
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**id** | **str** | | [optional]
7+
**webhook_id** | **str** | | [optional]
8+
**response_status_code** | **int** | | [optional]
9+
**delivered_at** | **datetime** | | [optional]
10+
**duration_ms** | **int** | | [optional]
11+
**created_at** | **datetime** | | [optional]
12+
**updated_at** | **datetime** | | [optional]
13+
14+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15+
16+

phrase_api/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
from phrase_api.api.users_api import UsersApi
5858
from phrase_api.api.variables_api import VariablesApi
5959
from phrase_api.api.versions___history_api import VersionsHistoryApi
60+
from phrase_api.api.webhook_deliveries_api import WebhookDeliveriesApi
6061
from phrase_api.api.webhooks_api import WebhooksApi
6162

6263
# import ApiClient
@@ -259,5 +260,6 @@
259260
from phrase_api.models.variable_update_parameters import VariableUpdateParameters
260261
from phrase_api.models.webhook import Webhook
261262
from phrase_api.models.webhook_create_parameters import WebhookCreateParameters
263+
from phrase_api.models.webhook_delivery import WebhookDelivery
262264
from phrase_api.models.webhook_update_parameters import WebhookUpdateParameters
263265

phrase_api/api/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,5 @@
4444
from phrase_api.api.users_api import UsersApi
4545
from phrase_api.api.variables_api import VariablesApi
4646
from phrase_api.api.versions___history_api import VersionsHistoryApi
47+
from phrase_api.api.webhook_deliveries_api import WebhookDeliveriesApi
4748
from phrase_api.api.webhooks_api import WebhooksApi

0 commit comments

Comments
 (0)