Documentation
¶
Overview ¶
Example ¶
package main
import (
"fmt"
"log"
"github.com/jqs7/go-fhj"
)
func main() {
client := fhj.New("https://api.zhconvert.org", "")
_, result, err := client.Convert(fhj.ConverterTaiwan, "什么鬼", nil)
if err != nil {
log.Fatalln(err)
}
fmt.Println(result.Text)
}
Output: 什麼鬼
Index ¶
Examples ¶
Constants ¶
View Source
const ( ConverterSimplified = "Simplified" ConverterTraditional = "Traditional" ConverterChina = "China" ConverterHongkong = "Hongkong" ConverterTaiwan = "Taiwan" ConverterPinyin = "Pinyin" ConverterMars = "Mars" ConverterWikiSimplified = "WikiSimplified" ConverterWikiTraditional = "WikiTraditional" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (Client) ServiceInfo ¶
func (c Client) ServiceInfo() (*RawResp, *StatusData, error)
type ConvertData ¶
type ConverterDesc ¶
type DiffTemplateDesc ¶
type DiffTemplateDesc struct {
Desc string
}
type StatusData ¶
type StatusData struct {
Converters map[string]ConverterDesc
Modules map[string]ModuleDesc
ConverterCategories map[string]string
ModuleCategories map[string]string
TextFormats map[string]string
DiffTemplates map[string]DiffTemplateDesc
AllowEmptyApiKey bool
MaxPostBodyBytes int
}
Click to show internal directories.
Click to hide internal directories.