Go utils for working with OneSky translation service.
package main
import (
"fmt"
"github.com/SebastianCzoch/onesky-go"
)
func main() {
onesky := onesky.Client{APIKey: "abcdef", Secret: "abcdef", ProjectID: 1}
fmt.Println(onesky.DownloadFile("filename", "locale"))
}
package main
import (
"fmt"
"github.com/SebastianCzoch/onesky-go"
)
func main() {
onesky := onesky.Client{APIKey: "abcdef", Secret: "abcdef", ProjectID: 1}
err := onesky.UploadFile("messages.yml", "YAML", "en-US")
if err != nil {
fmt.Println("Can not upload file")
}
}
package main
import (
"fmt"
"github.com/SebastianCzoch/onesky-go"
)
func main() {
onesky := onesky.Client{APIKey: "abcdef", Secret: "abcdef", ProjectID: 1}
err := onesky.DeleteFile("messages.yml")
if err != nil {
fmt.Println("Can not delete file")
}
}
package main
import (
"fmt"
"github.com/SebastianCzoch/onesky-go"
)
func main() {
onesky := onesky.Client{APIKey: "abcdef", Secret: "abcdef", ProjectID: 1}
list, err := onesky.ListFiles(1, 100)
if err != nil {
fmt.Println("Can not download list of uploaded files")
}
fmt.Println(list)
}
$ go get github.com/SebastianCzoch/onesky-go
Downloads translation file from OneSky.
Returns file content via string.
Upload translation file to OneSky.
file
should be a full path to file
Permanently remove file from OneSky service (with translations)!
Get informations about files uploaded to OneSky
$ go test ./...
Issues for this project should be reported on GitHub issues
Staff responsible for project: