Crowdin API in Go - https://crowdin.com/page/api
go get github.com/medisafe/go-crowdin
api := crowdin.New("token", "project-name")
📘 Check the doc - Documentation
Examples:
// get language status files, err := api.GetLanguageStatus("ru") // add file result, err := api.AddFile(&crowdin.AddFileOptions{ Type: "csv", Scheme: "identifier,source_or_translation,context", FirstLineContainsHeader: true, Files: map[string]string{ "strings_profile_section.csv" : "local/path/to/strings_profile_section.csv", }, })
You can print the internal errors by enabling debug to true
api.SetDebug(true, nil)
You can also define your own io.Writer
in case you want to persist the logs somewhere.
For example keeping the errors on file
logFile, err := os.Create("crowdin.log")
api.SetDebug(true, logFile)
Initialize app engine client and continue as usual
c := appengine.NewContext(r)
client := urlfetch.Client(c)
api := crowdin.New("token", "project-name")
api.SetClient(client)
Roman Kushnarenko - sromku
Apache License 2.0