Lokalise APIv2 Ruby SDK

Ruby interface for the Lokalise APIv2 that represents returned data as Ruby objects.

View the Project on GitHub lokalise/ruby-lokalise-api




Translation orders

Order attributes

Fetch orders

Doc

@client.orders(team_id, params = {})  # Input:
                                      ## team_id (integer, string, required)
                                      ## params (hash)
                                      ### :page and :limit
                                      # Output:
                                      ## Collection of orders for the given team

For example:

@client.orders team_id, limit: 1, page: 1

Fetch a single order

Doc

@client.order(team_id, order_id)  # Input:
                                  ## team_id (string, integer, required)
                                  ## order_id (string, required)
                                  # Output:
                                  ## A single order

Create an order

Doc

@client.create_order(team_id, params)  # Input:
                                       ## team_id (string, integer, required)
                                       ## params (hash, required)
                                       ### project_id (string, required)
                                       ### card_id (integer, string, required) - card to process payment
                                       ### briefing (string, required)
                                       ### source_language_iso (string, required)
                                       ### target_language_isos (array of strings, required)
                                       ### keys (array of integers, required) - keys to include in the order
                                       ### provider_slug (string, required)
                                       ### translation_tier (integer, required)
                                       ### dry_run (boolean) - return the response without actually placing an order. Useful for price estimation. Default is `false`
                                       ### translation_style (string) - only for gengo provider. Available values are `formal`, `informal`, `business`, `friendly`. Defaults to `friendly`.
                                       # Output:
                                       ## A newly created order

For example:

@client.create_order team_id,
                     project_id: project_id,
                     card_id: payment_card_id,
                     briefing: 'Some briefing',
                     source_language_iso: 'en',
                     target_language_isos: [
                       'ru'
                     ],
                     keys: [
                       1234,
                       5678 
                     ],
                     provider_slug: 'gengo',
                     translation_tier: '1',
                     dry_run: true