api

package
v0.0.0-...-5b44872 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Api_key string
View Source
var Host string

Functions

This section is empty.

Types

type Client

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

func New

func New(cfg Config) (*Client, error)

func (*Client) API

func (c *Client) API(resource string) string

func (*Client) Do

func (c *Client) Do(req *http.Request) (*http.Response, error)

func (*Client) GetJob

func (c *Client) GetJob() (*Job, error)

func (*Client) Info

func (c *Client) Info() (*Printer, error)

func (*Client) ListFiles

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

func (*Client) Run

func (c *Client) Run(commands []string) error

func (*Client) SelectFile

func (c *Client) SelectFile(file File) error

func (*Client) UploadFile

func (c *Client) UploadFile(path string) (string, error)

type Config

type Config struct {
	Endpoint string
	Key      string

	Transport http.RoundTripper
}

type File

type File struct {
	Name string `json:"name"`
}

type Files

type Files struct {
	Files []File
}

type Gcode

type Gcode struct {
	Commands []string `json:"commands"`
}

type Job

type Job struct {
	Job JobInfo
}

type JobInfo

type JobInfo struct {
	File File
}

type Printer

type Printer struct {
	Temperature Temperature `json:"temperature"`
}

type Temp

type Temp struct {
	Actual float32 `json:"actual"`
	Offset float32 `json:"offset"`
	Target float32 `json:"target"`
}

type Temperature

type Temperature struct {
	Bed   Temp `json:"bed"`
	Tool0 Temp `json:"tool0"`
}

Jump to

Keyboard shortcuts

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