emessage

package module
v0.0.0-...-4edc3d8 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: MIT Imports: 3 Imported by: 0

README

emessage

a ruf.emessage.de API client written in golang

no credentials needed :D

see https://pkg.go.dev/github.com/derzombiiie/emessage

Documentation

Index

Constants

View Source
const (
	// Default credentials extracted from webinterface (yes they are constant and are still sent)
	DefaultUsername     = "sendRUF"
	DefaultPasswordHash = "38ec3d06496c26288290e5cd129c9cda3be82c4ce327618c573f70fae74c7370"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIRequest

type APIRequest interface {
	// contains filtered or unexported methods
}

type APIResponse

type APIResponse struct {
	ApiStatusCode int             `json:"apiStatusCode"`
	Data          APIResponseData `json:"data"`
}

type APIResponseData

type APIResponseData interface {
	// contains filtered or unexported methods
}

type ErrStatusCode

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

func (*ErrStatusCode) Error

func (s *ErrStatusCode) Error() string

func (*ErrStatusCode) StatusCode

func (s *ErrStatusCode) StatusCode() int

type Login2Request

type Login2Request struct {
	Username     string `json:"username"`
	PasswordHash string `json:"passwordHash"`
}

func (*Login2Request) Send

func (s *Login2Request) Send() (res *Login2Response, err error)

type Login2Response

type Login2Response struct {
	Username string `json:"username"`
	JWT      string `json:"jwt"`
}

type RecipientStatus

type RecipientStatus struct {
	Identifier        string `json:"identifier"`
	StatusSendMessage string `json:"statusSendMessage"`
}

type SendRufRequest

type SendRufRequest struct {
	JWT string `json:"-"`

	Identifier  string `json:"identifier"`
	MessageText string `json:"messageText"`
}

func (*SendRufRequest) Send

func (s *SendRufRequest) Send() (res *SendRufResponse, err error)

type SendRufResponse

type SendRufResponse struct {
	Status     string            `json:"status"`
	TrackingID string            `json:"trackingId"`
	Recipients []RecipientStatus `json:"recipients"`
}

func SendMessage

func SendMessage(identifier, messageText string) (*SendRufResponse, error)

SendMessage is a simple wrapper function that sends a message to one identifier

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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