blockai

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2018 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	URLAuth        = "https://blockai.com/api/v1/auth/"
	URLInitProfile = "https://blockai.com/api/v1/profile"
	URLUpload      = "https://files.blockai.com/v1/upload"
	URLReg         = "https://blockai.com/api/v1/registrations"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Name     string `json:"name"`
	Email    string `json:"email"`
	Password string `json:"password"`
	// contains filtered or unexported fields
}

func NewClient

func NewClient(name, email, passwd string) (*Client, error)

func NewRandomClient

func NewRandomClient() (*Client, error)

func (*Client) PostJSON

func (c *Client) PostJSON(url string, data interface{}) (*http.Response, error)

func (*Client) Upload

func (c *Client) Upload(img *Img) error

type Img

type Img struct {
	Name      string `json:"name"`
	URL       string `json:"url"`
	IsPrivate bool   `json:"is_private"`
}

func NewImg

func NewImg(url string) *Img

func (*Img) FmtName

func (i *Img) FmtName()

Jump to

Keyboard shortcuts

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