Qordoba Ruby Client
The Ruby client for interacting with the Qordoba V2 API.
Basic Use
Install the SDK via RubyGems:
gem install qordoba_ruby_sdk
Instantiate a new app with your consumer_key, organization_id, and project_id:
app = QordobaRubySdk.new('{consumer_key}', '{organization_id}', '{project_id}')
Print a list of all the supported languages:
puts app.languages
Upload a file:
app.file_upload('{path_to_file}', '{version_tag}')
Download a file in JSON:
app.file_json('{language_id}', '{milestone_id}', '{file_id}')
Full Documentation
Getting Started
Get the status of the Qordoba API
app.ping
Language detail for Qordoba
app.languages
Country list for Qordoba
app.countries
Organization
Information about your organization's team members
app.organization_team
Project
List of projects that belong to an organization, including some project details.
app.project_list
Detailed information about a project
app.project_detail
Status of all projects
app.project_status
Milestone information, status, and language for a project
app.project_workflow
File
List of project files for a given target languageId or languageCode
app.file_list('{language_id}')
- language_id = number The id of a target language
List of the file types in a project
app.file_types
Uploads a JSON file with a version tag to a project
app.file_upload( '{path_to_file}', '{version_tag}' )
- path_to_file = string The path to the target file
- version_tag = string A version tag (i.e. '1.0') for the uploaded file
Returns a link for downloading a .zip file that contains project files for a specified page and target language
app.file_export( '{language_id}', '{file_ids}' )
- language_id = number The id of a target language
- file_ids = array|number List of file ids to download
Updates a file in a project - parallel updates are not supported
app.file_update( '{path_to_file}', '{file_id}' )
- path_to_file = string The path to the target file
- file_id = number The id of the target file to update
Lists the segments in a file
app.file_segments( '{language_id}', '{file_id}' )
- language_id = number The id of a target language
- file_id = number The id of the target file
Returns a file segment by its id
app.file_segment( '{language_id}', '{file_id}', '{segment_id}' )
- language_id = number The id of a target language
- file_id = number The id of the target file
- segment_id = number Id of target file segment
Returns json object of key value pairs representing a file
app.file_json( '{language_id}', '{milestone_id}', '{file_id}' )
- language_id = number The id of a target language
- milestone_id = number The id of the milestone to download translation from (i.e. 'proofreading')
- file_id = number The id of the target file
Contributing
Erik Suddath
License
The gem is available as open source under the terms of the MIT License.