Skip to content

Latest commit

 

History

History
33 lines (30 loc) · 1.46 KB

README.md

File metadata and controls

33 lines (30 loc) · 1.46 KB

10MinuteMail.net API client

Build status Test status NuGet

Code example:

public class Example
{
    public void Sync()
    {
        var t = new TenMinuteMailNet();
        Console.WriteLine(t.EmailAddress); //Your current email address
        Console.WriteLine(t.LastEmail); //Last email in inbox
        t.GenerateNewEmailAddress(); //Generate new inbox
        Console.WriteLine(t.SecondsLeft); //Seconds left to use email
        t.Reset10Minutes(); //Reset email - add 10 minutes
        t.Reset100Minutes(); //Reset email - add 100 minutes
    }

    public async Task Async()
    {
        var t = new TenMinuteMailNet();
        Console.WriteLine(await t.GetEmailAddressAsync()); //Your current email address
        Console.WriteLine(await t.GetLastEmailAsync()); //Last email in inbox
        await t.GenerateNewEmailAddressAsync(); //Generate new inbox
        Console.WriteLine(await t.GetSecondsLeftAsync()); //Seconds left to use email
        await t.Reset10MinutesAsync(); //Reset email - add 10 minutes
        await t.Reset100MinutesAsync(); //Reset email - add 100 minutes
    }
}