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 +4 -4
- data/README.md +1 -1
- data/lib/smartling_api/clients/smartling.rb +2 -2
- data/lib/smartling_api/project.rb +3 -5
- data/lib/smartling_api/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 713340cf808262a469600f0001be4079774b902f
|
4
|
+
data.tar.gz: 19477fba5d20febd6b1dda5265656f101aeee222
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9e72780412954073160ec77022c5f275c08c79d7b828511f15c8f18f318a2a0cb52dd0b41986a0e2d2ad9bef26a002961e605abad8aecaea096c7f9b1c76c2c
|
7
|
+
data.tar.gz: 8dd59928f5d9eb5ab7d7eaf4cb4d5b4d707b727eed95223163ce8efa5c3d4c6044b6dc2d10dc26bad992f41c03b740ad17bd8f0a0040eca4d9ab2b7302b22cd4
|
data/README.md
CHANGED
@@ -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
|
55
|
+
def upload(url:, token:, body:)
|
56
56
|
multipart_connection.post(url, body, header(token)).body.fetch('response')
|
57
57
|
end
|
58
58
|
|
59
|
-
#
|
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 #=>
|
18
|
+
# SmartlingApi::Project.new.list_locales #=> [{ "localeId" => "de-DE", "description" => "German (Germany)" }, ...]
|
19
19
|
#
|
20
|
-
# @return [
|
20
|
+
# @return [Array] Details of the locales available
|
21
21
|
def list_locales
|
22
|
-
|
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
|
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.
|
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-
|
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.
|
159
|
+
rubygems_version: 2.2.2
|
160
160
|
signing_key:
|
161
161
|
specification_version: 4
|
162
162
|
summary: Wrapper for the Smartling API.
|