fun_translations_client

module
v0.0.0-...-bac7946 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT

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

Path Synopsis

Jump to

Keyboard shortcuts

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