⚡ Methods used in API calls.#
This module contains classes representing different methods available in the Mail.tm webservice. Each class represents a set of related methods. The classes are used to construct method calls to the API of Mail.tm and make requests to their server.
DomainMethods
dataclass
#
AccountMethods
dataclass
#
AccountMethods(
CREATE_ACCOUNT="accounts",
GET_ACCOUNT_BY_ID="accounts/{id}",
DELETE_ACCOUNT_BY_ID="accounts/{id}",
GET_ME="me",
GET_ACCOUNT_TOKEN="token",
)
Represents methods related to accounts in Mail.tm webservice.
CREATE_ACCOUNT
class-attribute
instance-attribute
#
Creates a new account.
GET_ACCOUNT_BY_ID
class-attribute
instance-attribute
#
Retrieves an account by ID.
DELETE_ACCOUNT_BY_ID
class-attribute
instance-attribute
#
Deletes an account by ID.
GET_ACCOUNT_TOKEN
class-attribute
instance-attribute
#
Retrieves the token of the account.
MessageMethods
dataclass
#
MessageMethods(
GET_ALL_MESSAGES="messages",
GET_MESSAGE_BY_ID="messages/{id}",
DELETE_MESSAGE_BY_ID="messages/{id}",
PATCH_MESSAGE_BY_ID="messages/{id}",
GET_SOURCES_BY_ID="sources/{id}",
)
Represents methods related to messages in Mail.tm webservice.
GET_ALL_MESSAGES
class-attribute
instance-attribute
#
Retrieves all messages.
GET_MESSAGE_BY_ID
class-attribute
instance-attribute
#
Retrieves a message by ID.
DELETE_MESSAGE_BY_ID
class-attribute
instance-attribute
#
Deletes a message by ID.
PATCH_MESSAGE_BY_ID
class-attribute
instance-attribute
#
Updates a message by ID.
GET_SOURCES_BY_ID
class-attribute
instance-attribute
#
Retrieves sources for a message by ID.
ServerAuth
dataclass
#
ServerAuth(
account_token: str,
account_id: str,
account_address: t.Optional[str] = None,
account_password: t.Optional[str] = None,
)
A data class to authenticate with the server-client for Server Implementation.
account_address
class-attribute
instance-attribute
#
The address of the account.
AttachServer
dataclass
#
AttachServer(server: MailServerBase)
This contains an internal server instance to perform methods inherited from the server.