Documentation ¶
Index ¶
- Constants
- type PostTranslateRes
- type Session
- func (s *Session) DumpCookies() []config.Cookie
- func (s *Session) GetToken() (string, error)
- func (s *Session) PostTranslate(input string, isJP bool) (output string, err error)
- func (s *Session) Refresh() error
- func (s *Session) SetCacheCookie(ccs []config.Cookie)
- func (s *Session) SetToken(token string)
Constants ¶
View Source
const (
DefaultAPITimeout = 10
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostTranslateRes ¶ added in v0.0.2
type PostTranslateRes struct { Status string `json:"status"` Outputs []outputRes `json:"outputs"` }
{"status":"success","outputs":[{"output":"こんにちは。"}]}
type Session ¶
type Session struct { URL *url.URL HTTPClient *http.Client Token string // contains filtered or unexported fields }
func (*Session) DumpCookies ¶
func (*Session) PostTranslate ¶
func (*Session) SetCacheCookie ¶
Click to show internal directories.
Click to hide internal directories.