faxto

package module
v0.0.0-...-2129e2c Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: MIT Imports: 8 Imported by: 0

README

go-faxto

Go Reference

A Go SDK to use the Fax.to REST API.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(apiKey string) Client

func (*Client) DeleteFile

func (c *Client) DeleteFile(fileId uint64) error

func (*Client) GetBalance

func (c *Client) GetBalance() (float64, error)

func (*Client) GetFaxCost

func (c *Client) GetFaxCost(number string, docId uint64) (float64, error)

func (*Client) GetFaxHistory

func (c *Client) GetFaxHistory() ([]FaxHistoryEntry, error)

func (*Client) GetFaxStatus

func (c *Client) GetFaxStatus(faxJobId int) (string, error)

func (*Client) GetFiles

func (c *Client) GetFiles() ([]File, error)

func (*Client) SendFax

func (c *Client) SendFax(number string, fileId uint64) error

func (*Client) UploadFile

func (c *Client) UploadFile(file string) (uint64, error)

type FaxHistoryEntry

type FaxHistoryEntry struct {
	Id      uint64 `json:"id"`
	Created struct {
		Date         time.Time `json:"date"`
		DateTimeZone uint8     `json:"datetime_zone"`
		Timezone     string    `json:"timezone"`
	} `json:"created"`
	DocumentId uint64 `json:"document_id"`
	Document   string `json:"document"`
	Recipient  string `json:"recipient"`
	Status     string `json:"status"`
}

type File

type File struct {
	Id       uint64    `json:"id"`
	Filename string    `json:"filename"`
	Pages    uint      `json:"pages"`
	Size     uint64    `json:"size"`
	Uploaded time.Time `json:"uploaded"`
}

Jump to

Keyboard shortcuts

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