weynsee / go-phrase

Phrase api in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

go-phrase

go-phrase is a Go client library for accessing the PhraseApp API. It also includes a command line interface that implements all the commands in the official PhraseApp command-line client.

Documentation: GoDoc
Build Status: Build Status
Test Coverage: Test Coverage

go-phrase requires Go version 1.1 or greater.

CLI

Installation

Download the latest binary here

Usage

The CLI has 4 commands:

    init    Initializes a phrase project
    pull    Download the translation files in the current project
    push    Upload the translation files in the current project to PhraseApp
    tags    List all the tags in the current project

Options and arguments for the commands are the same those used in the official command-line client.

API

import "github.com/weynsee/go-phrase/phrase"

Construct a new API client, then use the various services on the client to access different parts of the PhraseApp API. For example, to list all the locales for your project token:

client := phrase.New(token)
locales, err := client.Locales.ListAll()

License

This library is distributed under the MIT license found in the LICENSE file.

About

Phrase api in Go

License:MIT License


Languages

Language:Go 100.0%