client

package
v0.0.2-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Endpoint = "http://translate.google.com/"
	Uri      = "m"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(config *Config) *Client

func (*Client) Translate

func (c *Client) Translate(text string) *Translator

type Config

type Config struct {
	Source string
	Target string
}

type Response

type Response struct {
	Err          error
	Status       string
	StatusCode   int
	ResponseBody []byte
}

type Translator

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

func (*Translator) Do

func (t *Translator) Do() *Response

func (*Translator) From

func (t *Translator) From(lang string) *Translator

func (*Translator) Get

func (t *Translator) Get() *Translator

func (*Translator) To

func (t *Translator) To(lang string) *Translator

Jump to

Keyboard shortcuts

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