module
Version:
v0.0.0-...-bac7946
Opens a new window with list of versions in this module.
Published: Aug 18, 2022
License: MIT
Opens a new window with license information.
README
¶
Golang client for fun translations
fun_translation_client is a Go client library for accessing the https://api.funtranslations.com/
Example:
package main
import (
"fmt"
"log"
"time"
"github.com/BalamutDiana/fun_translations_client"
)
func main() {
funtranslationsClient, err := funtranslations.NewClient(time.Second * 10)
if err != nil {
log.Fatal(err)
}
lang := funtranslations.GetLanguagesList()
text := "How was your day?"
translation, err := funtranslationsClient.GetTranslation(lang.Shakespeare, text)
if err != nil {
log.Fatal(err)
}
fmt.Println(translation)
}
Directories
¶
Click to show internal directories.
Click to hide internal directories.