4646
4747class TemV1Alpha1API (API ):
4848 """
49- Transactional Email API.
49+ Transactional Email API documentation .
5050
5151 Tem.
52- Transactional Email API.
52+ Transactional Email API documentation .
5353 """
5454
5555 async def create_email (
@@ -69,17 +69,18 @@ async def create_email(
6969 ) -> CreateEmailResponse :
7070 """
7171 Send an email.
72+ You must specify the `region`, the sender and the recipient's information and the `project_id` to send an email from a checked domain. The subject of the email must contain at least 6 characters.
7273 :param region: Region to target. If none is passed will use default region from the config.
73- :param from_: Sender information (must be from a checked domain declared in the project) .
74+ :param from_: Sender information. Must be from a checked domain declared in the Project .
7475 :param to: Array of recipient information (limited to 1 recipient).
7576 :param cc: Array of recipient information (unimplemented).
7677 :param bcc: Array of recipient information (unimplemented).
77- :param subject: Message subject .
78+ :param subject: Subject of the email .
7879 :param text: Text content.
7980 :param html: HTML content.
80- :param project_id: ID of the project in which to create the email.
81+ :param project_id: ID of the Project in which to create the email.
8182 :param attachments: Array of attachments.
82- :param send_before: Maximum date to deliver mail .
83+ :param send_before: Maximum date to deliver the email .
8384 :return: :class:`CreateEmailResponse <CreateEmailResponse>`
8485
8586 Usage:
@@ -127,7 +128,8 @@ async def get_email(
127128 region : Optional [Region ] = None ,
128129 ) -> Email :
129130 """
130- Get information about an email.
131+ Get an email.
132+ Retrieve information about a specific email using the `email_id` and `region` parameters.
131133 :param region: Region to target. If none is passed will use default region from the config.
132134 :param email_id: ID of the email to retrieve.
133135 :return: :class:`Email <Email>`
@@ -195,27 +197,28 @@ async def list_emails(
195197 project_id : Optional [str ] = None ,
196198 domain_id : Optional [str ] = None ,
197199 message_id : Optional [str ] = None ,
200+ subject : Optional [str ] = None ,
198201 since : Optional [datetime ] = None ,
199202 until : Optional [datetime ] = None ,
200203 mail_from : Optional [str ] = None ,
201204 mail_to : Optional [str ] = None ,
202205 statuses : Optional [List [EmailStatus ]] = None ,
203- subject : Optional [str ] = None ,
204206 ) -> ListEmailsResponse :
205207 """
206- List emails sent from a domain and/or for a project and/or for an organization.
208+ List emails.
209+ Retrieve the list of emails sent from a specific domain or for a specific Project or Organization. You must specify the `region`.
207210 :param region: Region to target. If none is passed will use default region from the config.
208211 :param page:
209212 :param page_size:
210- :param project_id: Optional ID of the project in which to list the emails.
211- :param domain_id: Optional ID of the domain for which to list the emails.
212- :param message_id: Optional ID of the message for which to list the emails.
213- :param since: Optional, list emails created after this date .
214- :param until: Optional, list emails created before this date.
215- :param mail_from: Optional, list emails sent with this `mail_from` sender's address .
216- :param mail_to: Optional, list emails sent with this `mail_to` recipient 's address.
217- :param statuses: Optional, list emails having any of this status .
218- :param subject: Optional, list emails having this subject .
213+ :param project_id: ID of the Project in which to list the emails (optional) .
214+ :param domain_id: ID of the domain for which to list the emails (optional) .
215+ :param message_id: ID of the message for which to list the emails (optional) .
216+ :param subject: Subject of the email .
217+ :param since: List emails created after this date (optional) .
218+ :param until: List emails created before this date (optional) .
219+ :param mail_from: List emails sent with this `mail_from` sender 's address (optional) .
220+ :param mail_to: List emails sent with this `mail_to` recipient's address (optional) .
221+ :param statuses: List emails having any of this status (optional) .
219222 :return: :class:`ListEmailsResponse <ListEmailsResponse>`
220223
221224 Usage:
@@ -258,27 +261,28 @@ async def list_emails_all(
258261 project_id : Optional [str ] = None ,
259262 domain_id : Optional [str ] = None ,
260263 message_id : Optional [str ] = None ,
264+ subject : Optional [str ] = None ,
261265 since : Optional [datetime ] = None ,
262266 until : Optional [datetime ] = None ,
263267 mail_from : Optional [str ] = None ,
264268 mail_to : Optional [str ] = None ,
265269 statuses : Optional [List [EmailStatus ]] = None ,
266- subject : Optional [str ] = None ,
267270 ) -> List [Email ]:
268271 """
269- List emails sent from a domain and/or for a project and/or for an organization.
272+ List emails.
273+ Retrieve the list of emails sent from a specific domain or for a specific Project or Organization. You must specify the `region`.
270274 :param region: Region to target. If none is passed will use default region from the config.
271275 :param page:
272276 :param page_size:
273- :param project_id: Optional ID of the project in which to list the emails.
274- :param domain_id: Optional ID of the domain for which to list the emails.
275- :param message_id: Optional ID of the message for which to list the emails.
276- :param since: Optional, list emails created after this date .
277- :param until: Optional, list emails created before this date.
278- :param mail_from: Optional, list emails sent with this `mail_from` sender's address .
279- :param mail_to: Optional, list emails sent with this `mail_to` recipient 's address.
280- :param statuses: Optional, list emails having any of this status .
281- :param subject: Optional, list emails having this subject .
277+ :param project_id: ID of the Project in which to list the emails (optional) .
278+ :param domain_id: ID of the domain for which to list the emails (optional) .
279+ :param message_id: ID of the message for which to list the emails (optional) .
280+ :param subject: Subject of the email .
281+ :param since: List emails created after this date (optional) .
282+ :param until: List emails created before this date (optional) .
283+ :param mail_from: List emails sent with this `mail_from` sender 's address (optional) .
284+ :param mail_to: List emails sent with this `mail_to` recipient's address (optional) .
285+ :param statuses: List emails having any of this status (optional) .
282286 :return: :class:`List[ListEmailsResponse] <List[ListEmailsResponse]>`
283287
284288 Usage:
@@ -298,12 +302,12 @@ async def list_emails_all(
298302 "project_id" : project_id ,
299303 "domain_id" : domain_id ,
300304 "message_id" : message_id ,
305+ "subject" : subject ,
301306 "since" : since ,
302307 "until" : until ,
303308 "mail_from" : mail_from ,
304309 "mail_to" : mail_to ,
305310 "statuses" : statuses ,
306- "subject" : subject ,
307311 },
308312 )
309313
@@ -318,13 +322,14 @@ async def get_statistics(
318322 mail_from : Optional [str ] = None ,
319323 ) -> Statistics :
320324 """
321- Get statistics on the email statuses.
325+ Email statuses.
326+ Get information on your emails' statuses.
322327 :param region: Region to target. If none is passed will use default region from the config.
323- :param project_id: Optional, count emails for this project .
324- :param domain_id: Optional, count emails send from this domain (must be coherent with the `project_id` and the `organization_id`).
325- :param since: Optional, count emails created after this date.
326- :param until: Optional, count emails created before this date.
327- :param mail_from: Optional, count emails sent with this `mail_from` sender's address.
328+ :param project_id: Number of emails for this Project (optional) .
329+ :param domain_id: Number of emails sent from this domain (must be coherent with the `project_id` and the `organization_id`) (optional ).
330+ :param since: Number of emails created after this date (optional) .
331+ :param until: Number of emails created before this date (optional) .
332+ :param mail_from: Number of emails sent with this `mail_from` sender's address (optional) .
328333 :return: :class:`Statistics <Statistics>`
329334
330335 Usage:
@@ -359,7 +364,8 @@ async def cancel_email(
359364 region : Optional [Region ] = None ,
360365 ) -> Email :
361366 """
362- Try to cancel an email if it has not yet been sent.
367+ Cancel an email.
368+ You can cancel the sending of an email if it has not been sent yet. You must specify the `region` and the `email_id` of the email you want to cancel.
363369 :param region: Region to target. If none is passed will use default region from the config.
364370 :param email_id: ID of the email to cancel.
365371 :return: :class:`Email <Email>`
@@ -393,10 +399,11 @@ async def create_domain(
393399 ) -> Domain :
394400 """
395401 Register a domain in a project.
402+ You must specify the `region`, `project_id` and `domain_name` to register a domain in a specific Project.
396403 :param region: Region to target. If none is passed will use default region from the config.
397404 :param project_id: ID of the project to which the domain belongs.
398405 :param domain_name: Fully qualified domain dame.
399- :param accept_tos: Accept the Scaleway Terms of Service.
406+ :param accept_tos: Accept Scaleway's Terms of Service.
400407 :return: :class:`Domain <Domain>`
401408
402409 Usage:
@@ -437,6 +444,7 @@ async def get_domain(
437444 ) -> Domain :
438445 """
439446 Get information about a domain.
447+ Retrieve information about a specific domain using the `region` and `domain_id` parameters.
440448 :param region: Region to target. If none is passed will use default region from the config.
441449 :param domain_id: ID of the domain.
442450 :return: :class:`Domain <Domain>`
@@ -507,9 +515,10 @@ async def list_domains(
507515 name : Optional [str ] = None ,
508516 ) -> ListDomainsResponse :
509517 """
510- List domains in a project and/or in an organization.
518+ List domains.
519+ Retrieve domains in a specific project or in a specific Organization using the `region` parameter.
511520 :param region: Region to target. If none is passed will use default region from the config.
512- :param page: Page number (1 for the first page) .
521+ :param page: Requested page number. Value must be greater or equal to 1 .
513522 :param page_size: Page size.
514523 :param project_id:
515524 :param status:
@@ -556,9 +565,10 @@ async def list_domains_all(
556565 name : Optional [str ] = None ,
557566 ) -> List [Domain ]:
558567 """
559- List domains in a project and/or in an organization.
568+ List domains.
569+ Retrieve domains in a specific project or in a specific Organization using the `region` parameter.
560570 :param region: Region to target. If none is passed will use default region from the config.
561- :param page: Page number (1 for the first page) .
571+ :param page: Requested page number. Value must be greater or equal to 1 .
562572 :param page_size: Page size.
563573 :param project_id:
564574 :param status:
@@ -594,9 +604,10 @@ async def revoke_domain(
594604 region : Optional [Region ] = None ,
595605 ) -> Domain :
596606 """
597- Revoke a domain.
607+ Delete a domain.
608+ You must specify the domain you want to delete by the `region` and `domain_id`. Deleting a domain is permanent and cannot be undone.
598609 :param region: Region to target. If none is passed will use default region from the config.
599- :param domain_id: ID of the domain to revoke .
610+ :param domain_id: ID of the domain to delete .
600611 :return: :class:`Domain <Domain>`
601612
602613 Usage:
@@ -625,7 +636,8 @@ async def check_domain(
625636 region : Optional [Region ] = None ,
626637 ) -> Domain :
627638 """
628- Ask for an immediate check of a domain (DNS check).
639+ Domain DNS check.
640+ Perform an immediate DNS check of a domain using the `region` and `domain_id` parameters.
629641 :param region: Region to target. If none is passed will use default region from the config.
630642 :param domain_id: ID of the domain to check.
631643 :return: :class:`Domain <Domain>`
0 commit comments