dooh

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2021 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BaseURL = "https://dooh-api.adhigh.net/api/v1"
View Source
var Extension app.Extension = extension{}

Functions

func ResourceURL

func ResourceURL(resourceType string, id string) string

Types

type Client

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

func NewClient

func NewClient(email, password string) *Client

func (*Client) Surfaces

func (c *Client) Surfaces(ctx context.Context) ([]Surface, error)

type CommandListener

type CommandListener struct {
	Client         *Client
	TelegramClient telegram.Client
	File           flu.File
	ChatID         telegram.ID
	ControlButtons *core.ControlButtons
	// contains filtered or unexported fields
}

func (*CommandListener) AuthorizedChatIDs

func (l *CommandListener) AuthorizedChatIDs() map[telegram.ID]bool

func (*CommandListener) Close

func (l *CommandListener) Close() error

func (*CommandListener) RunInBackground

func (l *CommandListener) RunInBackground(ctx context.Context, updateEvery time.Duration) error

func (*CommandListener) Update_surfaces

func (l *CommandListener) Update_surfaces(ctx context.Context, tgclient telegram.Client, cmd *telegram.Command) error

type EmailAuthRequest

type EmailAuthRequest struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type Surface

type Surface struct {
	ID         string `json:"id"`
	Attributes struct {
		Name      string `json:"name"`
		Network   string `json:"network"`
		SurfaceID string `json:"surfaceId"`
		CreatedAt Time   `json:"createdAt"`
		UpdatedAt Time   `json:"updatedAt"`
		DeletedAt *Time  `json:"deletedAt"`
	}
}

type SurfaceDictionary

type SurfaceDictionary struct {
	Surfaces map[string]Surface
}

type Time

type Time time.Time

func (*Time) GobDecode

func (t *Time) GobDecode(data []byte) error

func (Time) GobEncode

func (t Time) GobEncode() ([]byte, error)

func (Time) String

func (t Time) String() string

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(data []byte) error

type TokenResponse

type TokenResponse struct {
	Token        string `json:"token"`
	RefreshToken string `json:"refreshToken"`
}

Jump to

Keyboard shortcuts

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