phraseapp-ruby 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/phraseapp-ruby.rb +11 -5
- data/lib/phraseapp-ruby/request_handler.rb +4 -6
- data/lib/phraseapp-ruby/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: 5e2cc2aca07158e647604229632b99d347e5d905
|
4
|
+
data.tar.gz: 6f359db3c0878bc278417993707dd7d53e52bbd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38641675a9ceb97ced0700c9ccb62b436b943f2d05160850d99148e96fcb9dccae39c337d9aa87a682834324ea791709a02451537d49c8b9674eac36659f9c85
|
7
|
+
data.tar.gz: a039ecc1f03d1b24f0db5bd0b82a872b695dfef57c18dd0e0b6eb2e733acbbb7c715cd767516329f789f8baa9cec01e722d92e1595c3b05ea6e969d5ea7a0b4a
|
data/lib/phraseapp-ruby.rb
CHANGED
@@ -716,7 +716,7 @@ module RequestParams
|
|
716
716
|
# ProjectParams
|
717
717
|
# == Parameters:
|
718
718
|
# main_format::
|
719
|
-
# Main file format specified by its API Extension name. Used for locale downloads if no format is specified. For API Extension names of available file formats see <a href="
|
719
|
+
# Main file format specified by its API Extension name. Used for locale downloads if no format is specified. For API Extension names of available file formats see <a href="guides/formats/">Format Guide</a> or our <a href="https://api.phraseapp.com/api/v2/formats">Formats API Endpoint</a>.
|
720
720
|
# name::
|
721
721
|
# Name of the project
|
722
722
|
# shares_translation_memory::
|
@@ -948,7 +948,7 @@ module RequestParams
|
|
948
948
|
# UploadParams
|
949
949
|
# == Parameters:
|
950
950
|
# convert_emoji::
|
951
|
-
# Indicates whether the file contains Emoji symbols that should be converted. <a href="
|
951
|
+
# Indicates whether the file contains Emoji symbols that should be converted. <a href="guides/working-with-phraseapp/emoji-support/">Working with Emojis</a>.
|
952
952
|
# file::
|
953
953
|
# File to be imported
|
954
954
|
# file_format::
|
@@ -1311,13 +1311,15 @@ module RequestParams
|
|
1311
1311
|
# LocaleDownloadParams
|
1312
1312
|
# == Parameters:
|
1313
1313
|
# convert_emoji::
|
1314
|
-
# Indicates whether Emoji symbols should be converted to actual Emojis. <a href="
|
1314
|
+
# Indicates whether Emoji symbols should be converted to actual Emojis. <a href="guides/working-with-phraseapp/emoji-support/">Working with Emojis</a>.
|
1315
1315
|
# encoding::
|
1316
|
-
# Specify an encoding for the locale file. See the <a href="
|
1316
|
+
# Specify an encoding for the locale file. See the <a href="guides/formats">format guide</a> for a list of supported encodings for each format.
|
1317
|
+
# fallback_locale_id::
|
1318
|
+
# If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the public ID of the locale that should be used as the fallback.
|
1317
1319
|
# file_format::
|
1318
1320
|
# File format name. See the format guide for all supported file formats.
|
1319
1321
|
# format_options::
|
1320
|
-
# Additional formatting and render options. See the <a href="
|
1322
|
+
# Additional formatting and render options. See the <a href="guides/formats">format guide</a> for a list of options available for each format. Specify format options like this: <code>...&format_options[foo]=bar</code>
|
1321
1323
|
# include_empty_translations::
|
1322
1324
|
# Indicates whether keys without translations should be included in the output as well.
|
1323
1325
|
# keep_notranslate_tags::
|
@@ -1341,6 +1343,10 @@ module RequestParams
|
|
1341
1343
|
self.encoding = val
|
1342
1344
|
end
|
1343
1345
|
|
1346
|
+
def fallback_locale_id=(val)
|
1347
|
+
self.fallback_locale_id = val
|
1348
|
+
end
|
1349
|
+
|
1344
1350
|
def file_format=(val)
|
1345
1351
|
self.file_format = val
|
1346
1352
|
end
|
@@ -42,11 +42,9 @@ module PhraseApp
|
|
42
42
|
attr_accessor :limit, :remaining, :reset
|
43
43
|
|
44
44
|
def initialize(resp)
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
re.remaining = resp["X-Rate-Limit-Remaining"].to_i
|
49
|
-
re.reset = Time.at(resp["X-Rate-Limit-Reset"].to_i)
|
45
|
+
self.limit = resp["X-Rate-Limit-Limit"].to_i
|
46
|
+
self.remaining = resp["X-Rate-Limit-Remaining"].to_i
|
47
|
+
self.reset = Time.at(resp["X-Rate-Limit-Reset"].to_i)
|
50
48
|
return re, nil
|
51
49
|
end
|
52
50
|
|
@@ -170,7 +168,7 @@ module PhraseApp
|
|
170
168
|
end
|
171
169
|
return e
|
172
170
|
when 429
|
173
|
-
e, err = PhraseApp::RequestErrors::
|
171
|
+
e, err = PhraseApp::RequestErrors::RateLimitingError.new(resp)
|
174
172
|
if err != nil
|
175
173
|
return err
|
176
174
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phraseapp-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PhraseApp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: PhraseApp API client libary
|
14
14
|
email:
|
@@ -41,7 +41,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
41
41
|
version: '0'
|
42
42
|
requirements: []
|
43
43
|
rubyforge_project:
|
44
|
-
rubygems_version: 2.4.
|
44
|
+
rubygems_version: 2.4.6
|
45
45
|
signing_key:
|
46
46
|
specification_version: 4
|
47
47
|
summary: Interact with the PhraseApp API
|