rest

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2016 License: MIT Imports: 6 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AuthenticateURL        = "/auth-api/v2/authenticate"
	AuthenticateRefreshURL = "/auth-api/v2/authenticate/refresh"
	FilePushURL            = "/files-api/v2/projects/{{ .ProjectID }}/file"
	FilePullURL            = "/files-api/v2/projects/{{ .ProjectID }}/files/zip"
)
View Source
var BaseURL = "https://api.smartling.com"

Functions

func DynamicURL

func DynamicURL(url string, data interface{}) (string, error)

func Result

func Result(resp *resty.Response, data interface{}) (err error)

func StaticURL

func StaticURL(url string) string

Types

type Error

type Error struct {
	Message string `json:"message"`
}

type Model

type Model struct {
	Response struct {
		Code   string          `json:"code"`
		Data   json.RawMessage `json:"data,omitempty"`
		Errors []Error         `json:"errors,omitempty"`
	} `json:"response"`
}

func (*Model) Data

func (m *Model) Data(data interface{}) (err error)

func (*Model) Error

func (m *Model) Error() (err error)

func (*Model) IsOK

func (m *Model) IsOK() bool

Jump to

Keyboard shortcuts

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