python mailtrap handler
0.2.0
Pythonを使用したMailTrap基本機能の実装。
必要なのは、Pythonバージョン3.6以上です
pip3 install mailtrap-handler専用のドキュメントについては、ここをクリックしてください
from mailtrap_handler import MailTrapHandler
mailtrap = MailTrapHandler ( TOKEN , ACCOUNT_ID )
# then do what you need with the mailtrap objectメールIDを取得:
# default value for title is None
list_of_ids = mailtrap . get_mail_id ( inbox , email , title = "Some Title here" )
# returns a list of found mails idsメールHTMLコンテンツを取得:
# default value for title is None
# default value for waiting_time is 0
MailTrapHandler . get_mail ( inbox , email , title , waiting_time = 30 )
# returns mail html content受信トレイをきれいにします:
MailTrapHandler . clean_inbox ( inbox )ターゲットメールの削除:
MailTrapHandler . delete_mail ( inbox , email , title = "Some Title here" )
# default value for title is None from mailtrap_handler import MailTrapHandler
# requirements
token = "123wellthiswouldbeyourtokenhere098"
account_id = 987654
inbox = 12349876 # this is your mailtrap inbox id
email = "[email protected]"
title = "Oy! Congrats on getting Your new T-shirt"
# creating mailtraphandler object
mailtrap = MailTrapHandler ( token , account_id )
# getting the html content
mails = mailtrap . get_mail ( inbox , email , title = title , 10 )
# we do now whatever we need with the recieved mails
# and now we delete this mail
mailtrap . delete_mail ( inbox , email , title = title )
# you know what let's just delete every mail in the inbox
mailtrap . clean_inbox ( inbox )
# I got no more mails! このリポジトリに対する問題を歓迎し、リクエストを引き出します!
このリポジトリは、従来のコミットに従います
<type>(optional scope): <description>例: feat(pre-event): Add speakers section
利用可能なタイプは次のとおりです。
feat: Add table on landing page 、 feat: Remove table from landing pagefix: Illustration overflows in mobile viewページあたりのラベルEx: feat(pre-event): Add date label
スコープが不要な場合は、書く必要はありません
説明は、何が行われているかを完全に説明する必要があります。
重要な変更がある場合は、説明に壊れた変更を追加します。
複数の変更がある場合は、1つずつコミットします
feat: Add somethingfixタイプを使用する場合、問題をex: fix: File size limiter not workingを述べる上記のセマンティックリリース仕様に従ってコミットし、Circleci(およびSemantic-Release)に魔法をかけさせます。