Skip to content

Commit 825be09

Browse files
chore: sdk update
1 parent aeee9f4 commit 825be09

955 files changed

Lines changed: 3529 additions & 937 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,9 @@ Class | Method | HTTP request | Description
265265
*ReachAutomationsApi* | [**get_automation_details_v1**](docs/ReachAutomationsApi.md#get_automation_details_v1) | **GET** /api/reach/v1/profiles/{profileUuid}/automations/{automationUuid} | Get automation details
266266
*ReachAutomationsApi* | [**list_automation_steps_v1**](docs/ReachAutomationsApi.md#list_automation_steps_v1) | **GET** /api/reach/v1/profiles/{profileUuid}/automations/{automationUuid}/steps | List automation steps
267267
*ReachAutomationsApi* | [**list_automations_v1**](docs/ReachAutomationsApi.md#list_automations_v1) | **GET** /api/reach/v1/profiles/{profileUuid}/automations | List automations
268+
*ReachCampaignsApi* | [**get_campaign_details_v1**](docs/ReachCampaignsApi.md#get_campaign_details_v1) | **GET** /api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid} | Get campaign details
269+
*ReachCampaignsApi* | [**get_campaign_performance_v1**](docs/ReachCampaignsApi.md#get_campaign_performance_v1) | **GET** /api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid}/statistics | Get campaign performance
270+
*ReachCampaignsApi* | [**list_campaigns_v1**](docs/ReachCampaignsApi.md#list_campaigns_v1) | **GET** /api/reach/v1/profiles/{profileUuid}/campaigns | List campaigns
268271
*ReachContactFieldsApi* | [**create_a_contact_field_v1**](docs/ReachContactFieldsApi.md#create_a_contact_field_v1) | **POST** /api/reach/v1/profiles/{profileUuid}/contacts/fields | Create a contact field
269272
*ReachContactFieldsApi* | [**delete_a_contact_field_v1**](docs/ReachContactFieldsApi.md#delete_a_contact_field_v1) | **DELETE** /api/reach/v1/profiles/{profileUuid}/contacts/fields/{fieldUuid} | Delete a contact field
270273
*ReachContactFieldsApi* | [**list_contact_fields_v1**](docs/ReachContactFieldsApi.md#list_contact_fields_v1) | **GET** /api/reach/v1/profiles/{profileUuid}/contacts/fields | List contact fields
@@ -658,13 +661,19 @@ Class | Method | HTTP request | Description
658661
- [MailV1WebhooksWebhookSecretResource](docs/MailV1WebhooksWebhookSecretResource.md)
659662
- [MailV1WebhooksWebhookTestResultResource](docs/MailV1WebhooksWebhookTestResultResource.md)
660663
- [ReachListAutomationsV1200Response](docs/ReachListAutomationsV1200Response.md)
664+
- [ReachListCampaignsV1200Response](docs/ReachListCampaignsV1200Response.md)
661665
- [ReachListContactsV1200Response](docs/ReachListContactsV1200Response.md)
662666
- [ReachListProfileContactsV1200Response](docs/ReachListProfileContactsV1200Response.md)
663667
- [ReachListProfileSegmentContactsV1200Response](docs/ReachListProfileSegmentContactsV1200Response.md)
664668
- [ReachListProfileSegmentsV1200Response](docs/ReachListProfileSegmentsV1200Response.md)
665669
- [ReachV1AutomationsAutomationEventsResource](docs/ReachV1AutomationsAutomationEventsResource.md)
666670
- [ReachV1AutomationsAutomationResource](docs/ReachV1AutomationsAutomationResource.md)
667671
- [ReachV1AutomationsStepsAutomationStepResource](docs/ReachV1AutomationsStepsAutomationStepResource.md)
672+
- [ReachV1CampaignsCampaignDeliveryResource](docs/ReachV1CampaignsCampaignDeliveryResource.md)
673+
- [ReachV1CampaignsCampaignDetailsResource](docs/ReachV1CampaignsCampaignDetailsResource.md)
674+
- [ReachV1CampaignsCampaignResource](docs/ReachV1CampaignsCampaignResource.md)
675+
- [ReachV1CampaignsCampaignStatisticsResource](docs/ReachV1CampaignsCampaignStatisticsResource.md)
676+
- [ReachV1CampaignsCampaignSummaryStatisticsResource](docs/ReachV1CampaignsCampaignSummaryStatisticsResource.md)
668677
- [ReachV1ContactsBulkStoreRequest](docs/ReachV1ContactsBulkStoreRequest.md)
669678
- [ReachV1ContactsBulkStoreRequestContactsInner](docs/ReachV1ContactsBulkStoreRequestContactsInner.md)
670679
- [ReachV1ContactsContactDetailsResource](docs/ReachV1ContactsContactDetailsResource.md)

docs/ReachCampaignsApi.md

Lines changed: 248 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,248 @@
1+
# hostinger_api.ReachCampaignsApi
2+
3+
All URIs are relative to *https://developers.hostinger.com*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**get_campaign_details_v1**](ReachCampaignsApi.md#get_campaign_details_v1) | **GET** /api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid} | Get campaign details
8+
[**get_campaign_performance_v1**](ReachCampaignsApi.md#get_campaign_performance_v1) | **GET** /api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid}/statistics | Get campaign performance
9+
[**list_campaigns_v1**](ReachCampaignsApi.md#list_campaigns_v1) | **GET** /api/reach/v1/profiles/{profileUuid}/campaigns | List campaigns
10+
11+
12+
# **get_campaign_details_v1**
13+
> ReachV1CampaignsCampaignDetailsResource get_campaign_details_v1(profile_uuid, campaign_uuid)
14+
15+
Get campaign details
16+
17+
Get a single campaign with its sender, subject, template reference, targeting and delivery
18+
progress.
19+
20+
This describes how the campaign was set up and how far it has got. For opens, clicks and
21+
unsubscribes use the campaign statistics endpoint.
22+
23+
### Example
24+
25+
* Bearer Authentication (apiToken):
26+
27+
```python
28+
import hostinger_api
29+
from hostinger_api.models.reach_v1_campaigns_campaign_details_resource import ReachV1CampaignsCampaignDetailsResource
30+
from hostinger_api.rest import ApiException
31+
from pprint import pprint
32+
33+
34+
# Configure Bearer authorization: apiToken
35+
configuration = hostinger_api.Configuration(
36+
access_token = os.environ["BEARER_TOKEN"]
37+
)
38+
39+
# Enter a context with an instance of the API client
40+
with hostinger_api.ApiClient(configuration) as api_client:
41+
# Create an instance of the API class
42+
api_instance = hostinger_api.ReachCampaignsApi(api_client)
43+
profile_uuid = '550e8400-e09b-41d4-a716-400055000000' # str | Profile uuid parameter
44+
campaign_uuid = '550e8400-e09b-41d4-a716-400055000000' # str | Campaign uuid parameter
45+
46+
try:
47+
# Get campaign details
48+
api_response = api_instance.get_campaign_details_v1(profile_uuid, campaign_uuid)
49+
print("The response of ReachCampaignsApi->get_campaign_details_v1:\n")
50+
pprint(api_response)
51+
except Exception as e:
52+
print("Exception when calling ReachCampaignsApi->get_campaign_details_v1: %s\n" % e)
53+
```
54+
55+
56+
57+
### Parameters
58+
59+
60+
Name | Type | Description | Notes
61+
------------- | ------------- | ------------- | -------------
62+
**profile_uuid** | **str**| Profile uuid parameter |
63+
**campaign_uuid** | **str**| Campaign uuid parameter |
64+
65+
### Return type
66+
67+
[**ReachV1CampaignsCampaignDetailsResource**](ReachV1CampaignsCampaignDetailsResource.md)
68+
69+
### Authorization
70+
71+
[apiToken](../README.md#apiToken)
72+
73+
### HTTP request headers
74+
75+
- **Content-Type**: Not defined
76+
- **Accept**: application/json
77+
78+
### HTTP response details
79+
80+
| Status code | Description | Response headers |
81+
|-------------|-------------|------------------|
82+
**200** | Success response | - |
83+
**401** | Unauthenticated response | - |
84+
**500** | Error response | - |
85+
86+
[[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)
87+
88+
# **get_campaign_performance_v1**
89+
> ReachV1CampaignsCampaignStatisticsResource get_campaign_performance_v1(profile_uuid, campaign_uuid)
90+
91+
Get campaign performance
92+
93+
Get the performance of a campaign: delivery, opens, clicks and unsubscribes, with the
94+
matching rates.
95+
96+
Every count is unique contacts rather than raw events, so a contact who opens the same email
97+
five times is counted once.
98+
99+
### Example
100+
101+
* Bearer Authentication (apiToken):
102+
103+
```python
104+
import hostinger_api
105+
from hostinger_api.models.reach_v1_campaigns_campaign_statistics_resource import ReachV1CampaignsCampaignStatisticsResource
106+
from hostinger_api.rest import ApiException
107+
from pprint import pprint
108+
109+
110+
# Configure Bearer authorization: apiToken
111+
configuration = hostinger_api.Configuration(
112+
access_token = os.environ["BEARER_TOKEN"]
113+
)
114+
115+
# Enter a context with an instance of the API client
116+
with hostinger_api.ApiClient(configuration) as api_client:
117+
# Create an instance of the API class
118+
api_instance = hostinger_api.ReachCampaignsApi(api_client)
119+
profile_uuid = '550e8400-e09b-41d4-a716-400055000000' # str | Profile uuid parameter
120+
campaign_uuid = '550e8400-e09b-41d4-a716-400055000000' # str | Campaign uuid parameter
121+
122+
try:
123+
# Get campaign performance
124+
api_response = api_instance.get_campaign_performance_v1(profile_uuid, campaign_uuid)
125+
print("The response of ReachCampaignsApi->get_campaign_performance_v1:\n")
126+
pprint(api_response)
127+
except Exception as e:
128+
print("Exception when calling ReachCampaignsApi->get_campaign_performance_v1: %s\n" % e)
129+
```
130+
131+
132+
133+
### Parameters
134+
135+
136+
Name | Type | Description | Notes
137+
------------- | ------------- | ------------- | -------------
138+
**profile_uuid** | **str**| Profile uuid parameter |
139+
**campaign_uuid** | **str**| Campaign uuid parameter |
140+
141+
### Return type
142+
143+
[**ReachV1CampaignsCampaignStatisticsResource**](ReachV1CampaignsCampaignStatisticsResource.md)
144+
145+
### Authorization
146+
147+
[apiToken](../README.md#apiToken)
148+
149+
### HTTP request headers
150+
151+
- **Content-Type**: Not defined
152+
- **Accept**: application/json
153+
154+
### HTTP response details
155+
156+
| Status code | Description | Response headers |
157+
|-------------|-------------|------------------|
158+
**200** | Success response | - |
159+
**401** | Unauthenticated response | - |
160+
**500** | Error response | - |
161+
162+
[[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)
163+
164+
# **list_campaigns_v1**
165+
> ReachListCampaignsV1200Response list_campaigns_v1(profile_uuid, status=status, type=type, sort_direction=sort_direction, page=page, per_page=per_page)
166+
167+
List campaigns
168+
169+
Get a paginated list of the campaigns in a profile.
170+
171+
Each campaign carries its headline engagement rates. Filter by status to find drafts,
172+
scheduled, sending or sent campaigns, keeping in mind that a fully sent campaign has the
173+
status `publish`. By default only regular campaigns are returned - pass `type` to get the
174+
emails sent by automations or the double opt-in confirmations instead.
175+
176+
### Example
177+
178+
* Bearer Authentication (apiToken):
179+
180+
```python
181+
import hostinger_api
182+
from hostinger_api.models.reach_list_campaigns_v1200_response import ReachListCampaignsV1200Response
183+
from hostinger_api.rest import ApiException
184+
from pprint import pprint
185+
186+
187+
# Configure Bearer authorization: apiToken
188+
configuration = hostinger_api.Configuration(
189+
access_token = os.environ["BEARER_TOKEN"]
190+
)
191+
192+
# Enter a context with an instance of the API client
193+
with hostinger_api.ApiClient(configuration) as api_client:
194+
# Create an instance of the API class
195+
api_instance = hostinger_api.ReachCampaignsApi(api_client)
196+
profile_uuid = '550e8400-e09b-41d4-a716-400055000000' # str | Profile uuid parameter
197+
status = 'publish' # str | Filter campaigns by status. A fully sent campaign has the status `publish`. There is no `sent` status, and campaigns can be neither paused nor archived. (optional)
198+
type = campaign # str | Filter campaigns by type. Defaults to `campaign`, which leaves out the emails sent by automations and the double opt-in confirmations. (optional) (default to campaign)
199+
sort_direction = 'desc' # str | Order campaigns by creation date. Newest first unless set to `asc`. (optional)
200+
page = 1 # int | Page number (optional)
201+
per_page = 25 # int | Number of items per page (optional) (default to 25)
202+
203+
try:
204+
# List campaigns
205+
api_response = api_instance.list_campaigns_v1(profile_uuid, status=status, type=type, sort_direction=sort_direction, page=page, per_page=per_page)
206+
print("The response of ReachCampaignsApi->list_campaigns_v1:\n")
207+
pprint(api_response)
208+
except Exception as e:
209+
print("Exception when calling ReachCampaignsApi->list_campaigns_v1: %s\n" % e)
210+
```
211+
212+
213+
214+
### Parameters
215+
216+
217+
Name | Type | Description | Notes
218+
------------- | ------------- | ------------- | -------------
219+
**profile_uuid** | **str**| Profile uuid parameter |
220+
**status** | **str**| Filter campaigns by status. A fully sent campaign has the status `publish`. There is no `sent` status, and campaigns can be neither paused nor archived. | [optional]
221+
**type** | **str**| Filter campaigns by type. Defaults to `campaign`, which leaves out the emails sent by automations and the double opt-in confirmations. | [optional] [default to campaign]
222+
**sort_direction** | **str**| Order campaigns by creation date. Newest first unless set to `asc`. | [optional]
223+
**page** | **int**| Page number | [optional]
224+
**per_page** | **int**| Number of items per page | [optional] [default to 25]
225+
226+
### Return type
227+
228+
[**ReachListCampaignsV1200Response**](ReachListCampaignsV1200Response.md)
229+
230+
### Authorization
231+
232+
[apiToken](../README.md#apiToken)
233+
234+
### HTTP request headers
235+
236+
- **Content-Type**: Not defined
237+
- **Accept**: application/json
238+
239+
### HTTP response details
240+
241+
| Status code | Description | Response headers |
242+
|-------------|-------------|------------------|
243+
**200** | Success response | - |
244+
**401** | Unauthenticated response | - |
245+
**500** | Error response | - |
246+
247+
[[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)
248+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# ReachListCampaignsV1200Response
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**data** | [**List[ReachV1CampaignsCampaignResource]**](ReachV1CampaignsCampaignResource.md) | Array of [`Reach.V1.Campaigns.CampaignResource`](#model/reachv1campaignscampaignresource) | [optional]
9+
**meta** | [**CommonSchemaPaginationMetaSchema**](CommonSchemaPaginationMetaSchema.md) | | [optional]
10+
11+
## Example
12+
13+
```python
14+
from hostinger_api.models.reach_list_campaigns_v1200_response import ReachListCampaignsV1200Response
15+
16+
# TODO update the JSON string below
17+
json = "{}"
18+
# create an instance of ReachListCampaignsV1200Response from a JSON string
19+
reach_list_campaigns_v1200_response_instance = ReachListCampaignsV1200Response.from_json(json)
20+
# print the JSON string representation of the object
21+
print(ReachListCampaignsV1200Response.to_json())
22+
23+
# convert the object into a dict
24+
reach_list_campaigns_v1200_response_dict = reach_list_campaigns_v1200_response_instance.to_dict()
25+
# create an instance of ReachListCampaignsV1200Response from a dict
26+
reach_list_campaigns_v1200_response_from_dict = ReachListCampaignsV1200Response.from_dict(reach_list_campaigns_v1200_response_dict)
27+
```
28+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
29+
30+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# ReachV1CampaignsCampaignDeliveryResource
2+
3+
Delivery progress. While the campaign is `sending`, `total_sent` climbs towards the estimate.
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
**total_sent** | **int** | Emails sent so far. | [optional]
10+
**estimated_total_recipients** | **int** | Recipients this campaign was estimated to reach when sending started. Null for campaigns that have not started sending. | [optional]
11+
**subscribers_count** | **int** | Contacts currently targeted by this campaign. | [optional]
12+
13+
## Example
14+
15+
```python
16+
from hostinger_api.models.reach_v1_campaigns_campaign_delivery_resource import ReachV1CampaignsCampaignDeliveryResource
17+
18+
# TODO update the JSON string below
19+
json = "{}"
20+
# create an instance of ReachV1CampaignsCampaignDeliveryResource from a JSON string
21+
reach_v1_campaigns_campaign_delivery_resource_instance = ReachV1CampaignsCampaignDeliveryResource.from_json(json)
22+
# print the JSON string representation of the object
23+
print(ReachV1CampaignsCampaignDeliveryResource.to_json())
24+
25+
# convert the object into a dict
26+
reach_v1_campaigns_campaign_delivery_resource_dict = reach_v1_campaigns_campaign_delivery_resource_instance.to_dict()
27+
# create an instance of ReachV1CampaignsCampaignDeliveryResource from a dict
28+
reach_v1_campaigns_campaign_delivery_resource_from_dict = ReachV1CampaignsCampaignDeliveryResource.from_dict(reach_v1_campaigns_campaign_delivery_resource_dict)
29+
```
30+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
31+
32+
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# ReachV1CampaignsCampaignDetailsResource
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**uuid** | **str** | | [optional]
9+
**title** | **str** | | [optional]
10+
**subject** | **str** | | [optional]
11+
**sender_name** | **str** | | [optional]
12+
**sender_email** | **str** | | [optional]
13+
**template_uuid** | **str** | The email template this campaign uses. The template title is not exposed. | [optional]
14+
**status** | **str** | A fully sent campaign is `publish`. There is no `sent`, `paused` or `archived` status. | [optional]
15+
**type** | **str** | | [optional]
16+
**failure_reason** | **str** | Set only while the status is `failed`. | [optional]
17+
**is_smart_send** | **bool** | Whether delivery time is picked per contact rather than sent to everyone at once. | [optional]
18+
**is_all_contacts** | **bool** | Whether the campaign targets every contact instead of the listed segments. | [optional]
19+
**delivery** | [**ReachV1CampaignsCampaignDeliveryResource**](ReachV1CampaignsCampaignDeliveryResource.md) | | [optional]
20+
**segment_uuids** | **List[str]** | Segments this campaign targets. Empty when it targets all contacts. | [optional]
21+
**created_at** | **datetime** | | [optional]
22+
**updated_at** | **datetime** | | [optional]
23+
**sent_at** | **datetime** | | [optional]
24+
**scheduled_at** | **datetime** | | [optional]
25+
26+
## Example
27+
28+
```python
29+
from hostinger_api.models.reach_v1_campaigns_campaign_details_resource import ReachV1CampaignsCampaignDetailsResource
30+
31+
# TODO update the JSON string below
32+
json = "{}"
33+
# create an instance of ReachV1CampaignsCampaignDetailsResource from a JSON string
34+
reach_v1_campaigns_campaign_details_resource_instance = ReachV1CampaignsCampaignDetailsResource.from_json(json)
35+
# print the JSON string representation of the object
36+
print(ReachV1CampaignsCampaignDetailsResource.to_json())
37+
38+
# convert the object into a dict
39+
reach_v1_campaigns_campaign_details_resource_dict = reach_v1_campaigns_campaign_details_resource_instance.to_dict()
40+
# create an instance of ReachV1CampaignsCampaignDetailsResource from a dict
41+
reach_v1_campaigns_campaign_details_resource_from_dict = ReachV1CampaignsCampaignDetailsResource.from_dict(reach_v1_campaigns_campaign_details_resource_dict)
42+
```
43+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
44+
45+

0 commit comments

Comments
 (0)