gpalu

package module
v0.0.0-...-6d7834d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2021 License: MIT Imports: 5 Imported by: 0

README

go-gpalu

A simple Gpalu wrapper made in Golang

Installation

go get github.com/MohanadHosny/go-gpalu

Usage

Generate new email

client := gpalu.NewClient(nil)
email := client.GetAddress()

Get Inbox/Mails

client := gpalu.NewClient(nil)
mails := client.GetInbox("email@gpa.lu", 2)

Notice

The 2 in GetInbox represents mails limit to grab. Also, it returns an Array of struct Mail.

Client.GetAddress gives random email, tho you can use any random email that includes @gpa.lu without using this method.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadBody

func ReadBody(resp *http.Response, err error) []byte

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(userClient *http.Client) *Client

Create new Gpalu Client.

func (*Client) GetAddress

func (client *Client) GetAddress() string

Get new random email address.

func (*Client) GetContent

func (client *Client) GetContent(email string, messageId string) string

Get mail content by id.

func (*Client) GetInbox

func (client *Client) GetInbox(email string, limit int) []Mail

Get inbox.

type Mail

type Mail struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL