Skip to content

Commit 2a9f2b5

Browse files
committed
Updated python API Client
1 parent 0ef0179 commit 2a9f2b5

108 files changed

Lines changed: 2511 additions & 1805 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.

.openapi-generator/FILES

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ docs/BlockingApi.md
88
docs/DenyRuleNew.md
99
docs/DenyRuleRecord.md
1010
docs/EmailAddressName.md
11+
docs/EmailAddressNames.md
12+
docs/EmailAddressParam.md
1113
docs/EmailAddressTypes.md
1214
docs/EmailAddressesTypes.md
1315
docs/ErrorMessage.md
@@ -20,14 +22,13 @@ docs/MailBlocks.md
2022
docs/MailLog.md
2123
docs/MailLogEntry.md
2224
docs/MailOrder.md
25+
docs/MailOrderDetail.md
2326
docs/MailStatsType.md
24-
docs/MailStatsTypeVolume.md
25-
docs/MailStatsTypeVolumeFrom.md
26-
docs/MailStatsTypeVolumeIp.md
27-
docs/MailStatsTypeVolumeTo.md
27+
docs/MailStatsVolume.md
2828
docs/SendMail.md
2929
docs/SendMailAdv.md
3030
docs/SendMailRaw.md
31+
docs/SendMailTo.md
3132
docs/SendingApi.md
3233
docs/ServicesApi.md
3334
docs/StatusApi.md
@@ -47,6 +48,8 @@ openapi_client/models/__init__.py
4748
openapi_client/models/deny_rule_new.py
4849
openapi_client/models/deny_rule_record.py
4950
openapi_client/models/email_address_name.py
51+
openapi_client/models/email_address_names.py
52+
openapi_client/models/email_address_param.py
5053
openapi_client/models/email_address_types.py
5154
openapi_client/models/email_addresses_types.py
5255
openapi_client/models/error_message.py
@@ -58,14 +61,13 @@ openapi_client/models/mail_blocks.py
5861
openapi_client/models/mail_log.py
5962
openapi_client/models/mail_log_entry.py
6063
openapi_client/models/mail_order.py
64+
openapi_client/models/mail_order_detail.py
6165
openapi_client/models/mail_stats_type.py
62-
openapi_client/models/mail_stats_type_volume.py
63-
openapi_client/models/mail_stats_type_volume_from.py
64-
openapi_client/models/mail_stats_type_volume_ip.py
65-
openapi_client/models/mail_stats_type_volume_to.py
66+
openapi_client/models/mail_stats_volume.py
6667
openapi_client/models/send_mail.py
6768
openapi_client/models/send_mail_adv.py
6869
openapi_client/models/send_mail_raw.py
70+
openapi_client/models/send_mail_to.py
6971
openapi_client/py.typed
7072
openapi_client/rest.py
7173
pyproject.toml
@@ -78,6 +80,8 @@ test/test_blocking_api.py
7880
test/test_deny_rule_new.py
7981
test/test_deny_rule_record.py
8082
test/test_email_address_name.py
83+
test/test_email_address_names.py
84+
test/test_email_address_param.py
8185
test/test_email_address_types.py
8286
test/test_email_addresses_types.py
8387
test/test_error_message.py
@@ -90,14 +94,13 @@ test/test_mail_blocks.py
9094
test/test_mail_log.py
9195
test/test_mail_log_entry.py
9296
test/test_mail_order.py
97+
test/test_mail_order_detail.py
9398
test/test_mail_stats_type.py
94-
test/test_mail_stats_type_volume.py
95-
test/test_mail_stats_type_volume_from.py
96-
test/test_mail_stats_type_volume_ip.py
97-
test/test_mail_stats_type_volume_to.py
99+
test/test_mail_stats_volume.py
98100
test/test_send_mail.py
99101
test/test_send_mail_adv.py
100102
test/test_send_mail_raw.py
103+
test/test_send_mail_to.py
101104
test/test_sending_api.py
102105
test/test_services_api.py
103106
test/test_status_api.py

.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.20.0
1+
7.21.0

README.md

Lines changed: 51 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,47 @@
11
# openapi-client
22
**Send emails fast and with confidence through our easy to use [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) API interface.**
3+
34
# Overview
4-
This is the API interface to the [Mail Baby](https//mail.baby/) Mail services provided by [InterServer](https://www.interserver.net). To use this service you must have an account with us at [my.interserver.net](https://my.interserver.net).
5+
6+
This is the API interface to the [Mail Baby](https://mail.baby/) Mail services provided by [InterServer](https://www.interserver.net). To use this service you must have an account with us at [my.interserver.net](https://my.interserver.net).
7+
8+
# Mail Orders
9+
10+
Every sending account in MailBaby is backed by a **Mail Order** — a provisioned sending credential with a numeric `id` and a corresponding SMTP username (`mb<id>`). Most calls accept an optional `id` parameter; when omitted the API automatically selects the first active order on your account. Use `GET /mail` to list all orders, and `GET /mail/{id}` to inspect a single order including its current SMTP password.
11+
12+
# Sending Email
13+
14+
Three sending methods are available depending on your use-case:
15+
| Endpoint | Best for | |----------|----------| | `POST /mail/send` | Simple single-recipient messages | | `POST /mail/advsend` | Multiple recipients, CC/BCC, attachments, named contacts | | `POST /mail/rawsend` | Pre-built RFC 822 messages (e.g. DKIM-signed payloads) |
16+
17+
After a successful send each endpoint returns a `GenericResponse` whose `text` field contains the **transaction ID** assigned by the relay. This ID can later be matched against entries in `GET /mail/log` via the `mailid` query parameter.
18+
19+
# Filtering & Logs
20+
21+
`GET /mail/log` provides paginated access to every message accepted by the relay for your account. Combine any of the query parameters to narrow results — e.g. `from`, `to`, `subject`, `messageId`, `origin`, `mx`, `startDate`/`endDate`, and `delivered`.
22+
23+
# Blocking
24+
25+
Two independent mechanisms exist for suppressing unwanted email:
26+
- **Block lists** (`GET /mail/blocks`, `POST /mail/blocks/delete`) — addresses flagged by the
27+
system spam filters (LOCAL_BL_RCPT / MBTRAP rules in rspamd, and suspicious subjects).
28+
- **Deny rules** (`GET /mail/rules`, `POST /mail/rules`, `DELETE /mail/rules/{ruleId}`) —
29+
custom rules you configure to reject specific senders, domains, destination addresses, or
30+
subject-line prefixes before a message is even attempted.
31+
32+
533
# Authentication
34+
635
In order to use most of the API calls you must pass credentials from the [my.interserver.net](https://my.interserver.net/) site.
736
We support several different authentication methods but the preferred method is to use the **API Key** which you can get from the [Account Security](https://my.interserver.net/account_security) page.
37+
Pass your key in the `X-API-KEY` HTTP request header for every protected call.
838

939

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

12-
- API version: 1.3.0
42+
- API version: 1.4.0
1343
- Package version: 1.0.0
14-
- Generator version: 7.20.0
44+
- Generator version: 7.21.0
1545
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1646
For more information, please visit [https://www.mail.baby/contact/](https://www.mail.baby/contact/)
1747

@@ -85,11 +115,11 @@ with openapi_client.ApiClient(configuration) as api_client:
85115
# Create an instance of the API class
86116
api_instance = openapi_client.BlockingApi(api_client)
87117
type = 'type_example' # str | The type of deny rule.
88-
data = 'data_example' # str | The content of the rule. If a domain type rule then an example would be google.com. For a begins with type an example would be msgid-. For the email typer an example would be user@server.com.
89-
user = 'user_example' # str | Mail account username that will be tied to this rule. If not specified the first active mail order will be used. (optional)
118+
data = 'data_example' # str | The value to match against, interpreted according to `type`: a full email address for `email`/`destination`, a domain name for `domain`, or an alphanumeric prefix string for `startswith`.
119+
user = 'user_example' # str | Optional SMTP username of the mail order to associate this rule with (e.g. `mb20682`). If omitted the first active order is used. Valid usernames are the `username` values returned by `GET /mail`. (optional)
90120

91121
try:
92-
# Creates a new email deny rule.
122+
# Creates a new email deny rule
93123
api_response = api_instance.add_rule(type, data, user=user)
94124
print("The response of BlockingApi->add_rule:\n")
95125
pprint(api_response)
@@ -104,17 +134,18 @@ All URIs are relative to *https://api.mailbaby.net*
104134

105135
Class | Method | HTTP request | Description
106136
------------ | ------------- | ------------- | -------------
107-
*BlockingApi* | [**add_rule**](docs/BlockingApi.md#add_rule) | **POST** /mail/rules | Creates a new email deny rule.
108-
*BlockingApi* | [**delete_rule**](docs/BlockingApi.md#delete_rule) | **DELETE** /mail/rules/{ruleId} | Removes an deny mail rule.
109-
*BlockingApi* | [**delist_block**](docs/BlockingApi.md#delist_block) | **POST** /mail/blocks/delete | Removes an email address from the blocked list
110-
*BlockingApi* | [**get_mail_blocks**](docs/BlockingApi.md#get_mail_blocks) | **GET** /mail/blocks | displays a list of blocked email addresses
111-
*BlockingApi* | [**get_rules**](docs/BlockingApi.md#get_rules) | **GET** /mail/rules | Displays a listing of deny email rules.
112-
*HistoryApi* | [**get_stats**](docs/HistoryApi.md#get_stats) | **GET** /mail/stats | Account usage statistics.
113-
*HistoryApi* | [**view_mail_log**](docs/HistoryApi.md#view_mail_log) | **GET** /mail/log | displays the mail log
114-
*SendingApi* | [**raw_mail**](docs/SendingApi.md#raw_mail) | **POST** /mail/rawsend | Sends a raw email
137+
*BlockingApi* | [**add_rule**](docs/BlockingApi.md#add_rule) | **POST** /mail/rules | Creates a new email deny rule
138+
*BlockingApi* | [**delete_rule**](docs/BlockingApi.md#delete_rule) | **DELETE** /mail/rules/{ruleId} | Removes a deny mail rule
139+
*BlockingApi* | [**delist_block**](docs/BlockingApi.md#delist_block) | **POST** /mail/blocks/delete | Removes an email address from the block lists
140+
*BlockingApi* | [**get_mail_blocks**](docs/BlockingApi.md#get_mail_blocks) | **GET** /mail/blocks | Displays a list of blocked email addresses
141+
*BlockingApi* | [**get_rules**](docs/BlockingApi.md#get_rules) | **GET** /mail/rules | Displays a listing of deny email rules
142+
*HistoryApi* | [**get_stats**](docs/HistoryApi.md#get_stats) | **GET** /mail/stats | Account usage statistics
143+
*HistoryApi* | [**view_mail_log**](docs/HistoryApi.md#view_mail_log) | **GET** /mail/log | Displays the mail log
144+
*SendingApi* | [**raw_mail**](docs/SendingApi.md#raw_mail) | **POST** /mail/rawsend | Sends a raw RFC 822 email
115145
*SendingApi* | [**send_adv_mail**](docs/SendingApi.md#send_adv_mail) | **POST** /mail/advsend | Sends an Email with Advanced Options
116146
*SendingApi* | [**send_mail**](docs/SendingApi.md#send_mail) | **POST** /mail/send | Sends an Email
117-
*ServicesApi* | [**get_mail_orders**](docs/ServicesApi.md#get_mail_orders) | **GET** /mail | displays a list of mail service orders
147+
*ServicesApi* | [**get_mail_order_by_id**](docs/ServicesApi.md#get_mail_order_by_id) | **GET** /mail/{id} | Displays details for a single mail order
148+
*ServicesApi* | [**get_mail_orders**](docs/ServicesApi.md#get_mail_orders) | **GET** /mail | Displays a list of mail service orders
118149
*StatusApi* | [**ping_server**](docs/StatusApi.md#ping_server) | **GET** /ping | Checks if the server is running
119150

120151

@@ -123,6 +154,8 @@ Class | Method | HTTP request | Description
123154
- [DenyRuleNew](docs/DenyRuleNew.md)
124155
- [DenyRuleRecord](docs/DenyRuleRecord.md)
125156
- [EmailAddressName](docs/EmailAddressName.md)
157+
- [EmailAddressNames](docs/EmailAddressNames.md)
158+
- [EmailAddressParam](docs/EmailAddressParam.md)
126159
- [EmailAddressTypes](docs/EmailAddressTypes.md)
127160
- [EmailAddressesTypes](docs/EmailAddressesTypes.md)
128161
- [ErrorMessage](docs/ErrorMessage.md)
@@ -134,14 +167,13 @@ Class | Method | HTTP request | Description
134167
- [MailLog](docs/MailLog.md)
135168
- [MailLogEntry](docs/MailLogEntry.md)
136169
- [MailOrder](docs/MailOrder.md)
170+
- [MailOrderDetail](docs/MailOrderDetail.md)
137171
- [MailStatsType](docs/MailStatsType.md)
138-
- [MailStatsTypeVolume](docs/MailStatsTypeVolume.md)
139-
- [MailStatsTypeVolumeFrom](docs/MailStatsTypeVolumeFrom.md)
140-
- [MailStatsTypeVolumeIp](docs/MailStatsTypeVolumeIp.md)
141-
- [MailStatsTypeVolumeTo](docs/MailStatsTypeVolumeTo.md)
172+
- [MailStatsVolume](docs/MailStatsVolume.md)
142173
- [SendMail](docs/SendMail.md)
143174
- [SendMailAdv](docs/SendMailAdv.md)
144175
- [SendMailRaw](docs/SendMailRaw.md)
176+
- [SendMailTo](docs/SendMailTo.md)
145177

146178

147179
<a id="documentation-for-authorization"></a>

0 commit comments

Comments
 (0)