Skip to content

Instantly share code, notes, and snippets.

@jfsso
Created June 21, 2016 01:55
Show Gist options
  • Save jfsso/5cd988dcf815c7833a85b01cd53deac6 to your computer and use it in GitHub Desktop.
Save jfsso/5cd988dcf815c7833a85b01cd53deac6 to your computer and use it in GitHub Desktop.
Script that uploads Android strings to OneSky
require 'onesky'
# Settings
project_id = XXXXX
# Create client
client = Onesky::Client.new('<api_key>', '<api_secret>')
# show project details
project = client.project(project_id)
resp = JSON.parse(project.show)
p resp['data']
# upload file
resp = project.upload_file(file: 'app/src/main/res/values/strings.xml', file_format: 'ANDROID_XML', is_keeping_all_strings: 'false')
p resp.code # => 202
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment