smartling_api 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76fb3474897079955116d007a97a63c38d8ab16a
4
- data.tar.gz: f0e81c0d599940448cb754dbb2f4d803df61d9c3
3
+ metadata.gz: 713340cf808262a469600f0001be4079774b902f
4
+ data.tar.gz: 19477fba5d20febd6b1dda5265656f101aeee222
5
5
  SHA512:
6
- metadata.gz: 3db0d9a3a9ff65561827fdd0539472a21bb4d4de903ebfef0ce8d04189802ac60592a37ee488e228868a77bf0e1daaf1e82e1e996314d5350fbe325ed1b40018
7
- data.tar.gz: 338d09df750dbeb2bd7c70d5dd5d463c934de1d1fdae26cd19fc03766cefc95e89ece0a851c4aa836bf27808671e1bb1ad9b6d8fea98c8ecec92e48a73282629
6
+ metadata.gz: e9e72780412954073160ec77022c5f275c08c79d7b828511f15c8f18f318a2a0cb52dd0b41986a0e2d2ad9bef26a002961e605abad8aecaea096c7f9b1c76c2c
7
+ data.tar.gz: 8dd59928f5d9eb5ab7d7eaf4cb4d5b4d707b727eed95223163ce8efa5c3d4c6044b6dc2d10dc26bad992f41c03b740ad17bd8f0a0040eca4d9ab2b7302b22cd4
data/README.md CHANGED
@@ -16,7 +16,7 @@ The Smartling Translation API lets developers to internationalize their website
16
16
 
17
17
  Add this line to your application's Gemfile:
18
18
 
19
- gem 'smartling_api'
19
+ gem 'smartling_api', '0.2.0'
20
20
 
21
21
  ## Usage
22
22
 
@@ -52,11 +52,11 @@ module SmartlingApi
52
52
  # @param body [Hash] Request body to pass with request
53
53
  # @return [Hash] Response returned from request
54
54
  # @raise [Errors::Client] If response does not return a 2xx or 3xx
55
- def upload(url:, token: token, body:)
55
+ def upload(url:, token:, body:)
56
56
  multipart_connection.post(url, body, header(token)).body.fetch('response')
57
57
  end
58
58
 
59
- # Upload a file using a multipart request
59
+ # Download a file from smartling for the given url
60
60
  #
61
61
  # @param url [String] Path corresponding to API get request
62
62
  # @param token [String] OAuth2 token used for accessing endpoint
@@ -15,13 +15,11 @@ module SmartlingApi
15
15
  # @see http://docs.smartling.com/pages/API/v2/Projects/List-Projects/
16
16
  #
17
17
  # @example List Files
18
- # SmartlingApi::Project.new.list_locales #=> { "locales" => [{ "localeId" => "de-DE", "description" => "German (Germany)" }, ...] }
18
+ # SmartlingApi::Project.new.list_locales #=> [{ "localeId" => "de-DE", "description" => "German (Germany)" }, ...]
19
19
  #
20
- # @return [Hash] Details of the locales available with the key "locales"
20
+ # @return [Array] Details of the locales available
21
21
  def list_locales
22
- locales = smartling.get(url: "/projects-api/v2/projects/#{project_id}", token: token).fetch("targetLocales", [])
23
-
24
- { "locales" => locales }
22
+ smartling.get(url: "/projects-api/v2/projects/#{project_id}", token: token).fetch("targetLocales", [])
25
23
  end
26
24
 
27
25
  private
@@ -1,3 +1,3 @@
1
1
  module SmartlingApi
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartling_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Redbubble
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-22 00:00:00.000000000 Z
11
+ date: 2016-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -156,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
156
  version: '0'
157
157
  requirements: []
158
158
  rubyforge_project:
159
- rubygems_version: 2.6.6
159
+ rubygems_version: 2.2.2
160
160
  signing_key:
161
161
  specification_version: 4
162
162
  summary: Wrapper for the Smartling API.