phraseapp-ruby 1.0.17 → 1.0.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/phraseapp-ruby.rb +53 -42
  3. data/lib/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0de57bec8cf06be1a87f57f3654b355af1b6fdf3
4
- data.tar.gz: cd7d42bbf55adb3bf7241bfbe49d757f2602d5d8
3
+ metadata.gz: d33e536b87e643eaca72bbf61f347600f28c5fc2
4
+ data.tar.gz: a7372243e0bfc1d6a2c4fd0ff51cbb83f4a61a68
5
5
  SHA512:
6
- metadata.gz: ba486bef6649b624782935a57eb6977f73c8719f82178b63b5d23c026f8765f159c5b45b6b27483aaf1c39d06372f387419ead35670079571fc63c1cdf84996d
7
- data.tar.gz: a20ff4e9cd438495a0e4a3b83ec896a1412e85a0ff17ecc22202e6a2f8315bca5043a5ac69aaa2b85a4ca000f483da3f60e5e0fbcde65197f842ff2a51cc3304
6
+ metadata.gz: cb680d2767b2fa4deb886f61f6b0157f4e0c44f1d676ffffaa0b9895714e8893d316c89bd9544386a87268f9d6486afe43735eea827351981f697e207ac3082b
7
+ data.tar.gz: 8a901cb20cb53e452b92bc36364c83e8a65d39df7016d6fdf9bd210ed01824bd8db5e950adab716d08d2f3741aee504fd8f797952d06224797a55f4ddd9dcd4f
@@ -33,6 +33,14 @@ module ResponseObjects
33
33
  end
34
34
  end
35
35
 
36
+ class AffectedResources < ::OpenStruct
37
+ #records_affected,
38
+ def initialize(hash)
39
+ super(hash)
40
+ PhraseApp.handle_times(self)
41
+ end
42
+ end
43
+
36
44
  class Authorization < ::OpenStruct
37
45
  #created_at, expires_at, hashed_token, id, note, scopes, token_last_eight, updated_at,
38
46
  def initialize(hash)
@@ -450,7 +458,7 @@ module RequestParams
450
458
  end
451
459
 
452
460
  def tags=(val)
453
- self.tags = val.split(',')
461
+ self.tags = val
454
462
  end
455
463
 
456
464
  def unformatted=(val)
@@ -1026,7 +1034,7 @@ module RequestParams
1026
1034
  # locale_id::
1027
1035
  # Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
1028
1036
  # q::
1029
- # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>name:key_name</code> for text queries on key names</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1037
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>name:key_name</code> for text queries on key names</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Please note that the argument is named <code>--query</code> when using the <a href="https://phraseapp.com/cli" target="_blank">PhraseApp Client</a>. <br /><br /> Find more examples <a href="/api/v2/general/examples/">here</a>.
1030
1038
  class KeysDeleteParams < ::OpenStruct
1031
1039
  def locale_id=(val)
1032
1040
  self.locale_id = val
@@ -1051,7 +1059,7 @@ module RequestParams
1051
1059
  # order::
1052
1060
  # Order direction. Can be one of: asc, desc.
1053
1061
  # q::
1054
- # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>name:key_name</code> for text queries on key names</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1062
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>name:key_name</code> for text queries on key names</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Please note that the argument is named <code>--query</code> when using the <a href="https://phraseapp.com/cli" target="_blank">PhraseApp Client</a>. <br /><br /> Find more examples <a href="/api/v2/general/examples/">here</a>.
1055
1063
  # sort::
1056
1064
  # Sort by field. Can be one of: name, created_at, updated_at.
1057
1065
  class KeysListParams < ::OpenStruct
@@ -1086,7 +1094,7 @@ module RequestParams
1086
1094
  # order::
1087
1095
  # Order direction. Can be one of: asc, desc.
1088
1096
  # q::
1089
- # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>name:key_name</code> for text queries on key names</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1097
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>name:key_name</code> for text queries on key names</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Please note that the argument is named <code>--query</code> when using the <a href="https://phraseapp.com/cli" target="_blank">PhraseApp Client</a>. <br /><br /> Find more examples <a href="/api/v2/general/examples/">here</a>.
1090
1098
  # sort::
1091
1099
  # Sort by field. Can be one of: name, created_at, updated_at.
1092
1100
  class KeysSearchParams < ::OpenStruct
@@ -1119,7 +1127,7 @@ module RequestParams
1119
1127
  # locale_id::
1120
1128
  # Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
1121
1129
  # q::
1122
- # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>name:key_name</code> for text queries on key names</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1130
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>name:key_name</code> for text queries on key names</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Please note that the argument is named <code>--query</code> when using the <a href="https://phraseapp.com/cli" target="_blank">PhraseApp Client</a>. <br /><br /> Find more examples <a href="/api/v2/general/examples/">here</a>.
1123
1131
  # tags::
1124
1132
  # Tag or comma-separated list of tags to add to the matching collection of keys
1125
1133
  class KeysTagParams < ::OpenStruct
@@ -1132,11 +1140,11 @@ module RequestParams
1132
1140
  end
1133
1141
 
1134
1142
  def tags=(val)
1135
- self.tags = val.split(',')
1143
+ self.tags = val
1136
1144
  end
1137
1145
 
1138
1146
  def validate
1139
- if self.tags == nil
1147
+ if self.tags == nil || self.tags == ""
1140
1148
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"tags\" of \"keys_tagParams\" not set")
1141
1149
  end
1142
1150
  end
@@ -1150,7 +1158,7 @@ module RequestParams
1150
1158
  # locale_id::
1151
1159
  # Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
1152
1160
  # q::
1153
- # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>name:key_name</code> for text queries on key names</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1161
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>name:key_name</code> for text queries on key names</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Please note that the argument is named <code>--query</code> when using the <a href="https://phraseapp.com/cli" target="_blank">PhraseApp Client</a>. <br /><br /> Find more examples <a href="/api/v2/general/examples/">here</a>.
1154
1162
  # tags::
1155
1163
  # Tag or comma-separated list of tags to add to the matching collection of keys
1156
1164
  class KeysUntagParams < ::OpenStruct
@@ -1163,11 +1171,11 @@ module RequestParams
1163
1171
  end
1164
1172
 
1165
1173
  def tags=(val)
1166
- self.tags = val.split(',')
1174
+ self.tags = val
1167
1175
  end
1168
1176
 
1169
1177
  def validate
1170
- if self.tags == nil
1178
+ if self.tags == nil || self.tags == ""
1171
1179
  raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"tags\" of \"keys_untagParams\" not set")
1172
1180
  end
1173
1181
  end
@@ -1297,7 +1305,7 @@ module RequestParams
1297
1305
  # order::
1298
1306
  # Order direction. Can be one of: asc, desc.
1299
1307
  # q::
1300
- # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1308
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Please note that the argument is named <code>--query</code> when using the <a href="https://phraseapp.com/cli" target="_blank">PhraseApp Client</a>. <br /><br /> Find more examples <a href="/api/v2/general/examples/">here</a>.
1301
1309
  # sort::
1302
1310
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
1303
1311
  class TranslationsByKeyParams < ::OpenStruct
@@ -1326,7 +1334,7 @@ module RequestParams
1326
1334
  # order::
1327
1335
  # Order direction. Can be one of: asc, desc.
1328
1336
  # q::
1329
- # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1337
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Please note that the argument is named <code>--query</code> when using the <a href="https://phraseapp.com/cli" target="_blank">PhraseApp Client</a>. <br /><br /> Find more examples <a href="/api/v2/general/examples/">here</a>.
1330
1338
  # sort::
1331
1339
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
1332
1340
  class TranslationsByLocaleParams < ::OpenStruct
@@ -1355,7 +1363,7 @@ module RequestParams
1355
1363
  # order::
1356
1364
  # Order direction. Can be one of: asc, desc.
1357
1365
  # q::
1358
- # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1366
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Please note that the argument is named <code>--query</code> when using the <a href="https://phraseapp.com/cli" target="_blank">PhraseApp Client</a>. <br /><br /> Find more examples <a href="/api/v2/general/examples/">here</a>.
1359
1367
  # sort::
1360
1368
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
1361
1369
  class TranslationsExcludeParams < ::OpenStruct
@@ -1384,7 +1392,7 @@ module RequestParams
1384
1392
  # order::
1385
1393
  # Order direction. Can be one of: asc, desc.
1386
1394
  # q::
1387
- # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1395
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Please note that the argument is named <code>--query</code> when using the <a href="https://phraseapp.com/cli" target="_blank">PhraseApp Client</a>. <br /><br /> Find more examples <a href="/api/v2/general/examples/">here</a>.
1388
1396
  # sort::
1389
1397
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
1390
1398
  class TranslationsIncludeParams < ::OpenStruct
@@ -1413,7 +1421,7 @@ module RequestParams
1413
1421
  # order::
1414
1422
  # Order direction. Can be one of: asc, desc.
1415
1423
  # q::
1416
- # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1424
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Please note that the argument is named <code>--query</code> when using the <a href="https://phraseapp.com/cli" target="_blank">PhraseApp Client</a>. <br /><br /> Find more examples <a href="/api/v2/general/examples/">here</a>.
1417
1425
  # sort::
1418
1426
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
1419
1427
  class TranslationsListParams < ::OpenStruct
@@ -1442,7 +1450,7 @@ module RequestParams
1442
1450
  # order::
1443
1451
  # Order direction. Can be one of: asc, desc.
1444
1452
  # q::
1445
- # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1453
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Please note that the argument is named <code>--query</code> when using the <a href="https://phraseapp.com/cli" target="_blank">PhraseApp Client</a>. <br /><br /> Find more examples <a href="/api/v2/general/examples/">here</a>.
1446
1454
  # sort::
1447
1455
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
1448
1456
  class TranslationsSearchParams < ::OpenStruct
@@ -1471,7 +1479,7 @@ module RequestParams
1471
1479
  # order::
1472
1480
  # Order direction. Can be one of: asc, desc.
1473
1481
  # q::
1474
- # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1482
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Please note that the argument is named <code>--query</code> when using the <a href="https://phraseapp.com/cli" target="_blank">PhraseApp Client</a>. <br /><br /> Find more examples <a href="/api/v2/general/examples/">here</a>.
1475
1483
  # sort::
1476
1484
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
1477
1485
  class TranslationsUnverifyParams < ::OpenStruct
@@ -1500,7 +1508,7 @@ module RequestParams
1500
1508
  # order::
1501
1509
  # Order direction. Can be one of: asc, desc.
1502
1510
  # q::
1503
- # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1511
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Please note that the argument is named <code>--query</code> when using the <a href="https://phraseapp.com/cli" target="_blank">PhraseApp Client</a>. <br /><br /> Find more examples <a href="/api/v2/general/examples/">here</a>.
1504
1512
  # sort::
1505
1513
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
1506
1514
  class TranslationsVerifyParams < ::OpenStruct
@@ -1556,7 +1564,7 @@ end
1556
1564
  post_body = nil
1557
1565
 
1558
1566
  if params.present?
1559
- unless params.kind_of?(PhraseApp::RequestParams::AuthorizationCreateParams)
1567
+ unless params.kind_of?(PhraseApp::RequestParams::AuthorizationParams)
1560
1568
  raise PhraseApp::ParamsHelpers::ParamsError.new("Expects params to be kind_of PhraseApp::RequestParams::AuthorizationParams")
1561
1569
  end
1562
1570
  end
@@ -1637,7 +1645,7 @@ end
1637
1645
  post_body = nil
1638
1646
 
1639
1647
  if params.present?
1640
- unless params.kind_of?(PhraseApp::RequestParams::AuthorizationUpdateParams)
1648
+ unless params.kind_of?(PhraseApp::RequestParams::AuthorizationParams)
1641
1649
  raise PhraseApp::ParamsHelpers::ParamsError.new("Expects params to be kind_of PhraseApp::RequestParams::AuthorizationParams")
1642
1650
  end
1643
1651
  end
@@ -1696,7 +1704,7 @@ end
1696
1704
  post_body = nil
1697
1705
 
1698
1706
  if params.present?
1699
- unless params.kind_of?(PhraseApp::RequestParams::CommentCreateParams)
1707
+ unless params.kind_of?(PhraseApp::RequestParams::CommentParams)
1700
1708
  raise PhraseApp::ParamsHelpers::ParamsError.new("Expects params to be kind_of PhraseApp::RequestParams::CommentParams")
1701
1709
  end
1702
1710
  end
@@ -1867,7 +1875,7 @@ end
1867
1875
  post_body = nil
1868
1876
 
1869
1877
  if params.present?
1870
- unless params.kind_of?(PhraseApp::RequestParams::CommentUpdateParams)
1878
+ unless params.kind_of?(PhraseApp::RequestParams::CommentParams)
1871
1879
  raise PhraseApp::ParamsHelpers::ParamsError.new("Expects params to be kind_of PhraseApp::RequestParams::CommentParams")
1872
1880
  end
1873
1881
  end
@@ -1928,7 +1936,7 @@ end
1928
1936
  post_body = nil
1929
1937
 
1930
1938
  if params.present?
1931
- unless params.kind_of?(PhraseApp::RequestParams::ExcludeRuleCreateParams)
1939
+ unless params.kind_of?(PhraseApp::RequestParams::ExcludeRuleParams)
1932
1940
  raise PhraseApp::ParamsHelpers::ParamsError.new("Expects params to be kind_of PhraseApp::RequestParams::ExcludeRuleParams")
1933
1941
  end
1934
1942
  end
@@ -2015,7 +2023,7 @@ end
2015
2023
  post_body = nil
2016
2024
 
2017
2025
  if params.present?
2018
- unless params.kind_of?(PhraseApp::RequestParams::ExcludeRuleUpdateParams)
2026
+ unless params.kind_of?(PhraseApp::RequestParams::ExcludeRuleParams)
2019
2027
  raise PhraseApp::ParamsHelpers::ParamsError.new("Expects params to be kind_of PhraseApp::RequestParams::ExcludeRuleParams")
2020
2028
  end
2021
2029
  end
@@ -2095,7 +2103,7 @@ end
2095
2103
  post_body = nil
2096
2104
 
2097
2105
  if params.present?
2098
- unless params.kind_of?(PhraseApp::RequestParams::KeyCreateParams)
2106
+ unless params.kind_of?(PhraseApp::RequestParams::TranslationKeyParams)
2099
2107
  raise PhraseApp::ParamsHelpers::ParamsError.new("Expects params to be kind_of PhraseApp::RequestParams::TranslationKeyParams")
2100
2108
  end
2101
2109
  end
@@ -2240,7 +2248,7 @@ end
2240
2248
  post_body = nil
2241
2249
 
2242
2250
  if params.present?
2243
- unless params.kind_of?(PhraseApp::RequestParams::KeyUpdateParams)
2251
+ unless params.kind_of?(PhraseApp::RequestParams::TranslationKeyParams)
2244
2252
  raise PhraseApp::ParamsHelpers::ParamsError.new("Expects params to be kind_of PhraseApp::RequestParams::TranslationKeyParams")
2245
2253
  end
2246
2254
  end
@@ -2326,6 +2334,7 @@ end
2326
2334
  # Parameters of type PhraseApp::RequestParams::KeysDeleteParams
2327
2335
  #
2328
2336
  # == Returns:
2337
+ # PhraseApp::ResponseObjects::AffectedResources
2329
2338
  # err
2330
2339
  def self.keys_delete(project_id, params)
2331
2340
  path = sprintf("/api/v2/projects/%s/keys", project_id)
@@ -2344,12 +2353,12 @@ end
2344
2353
  return nil, err
2345
2354
  end
2346
2355
  reqHelper = PhraseApp::ParamsHelpers::BodyTypeHelper.new(data_hash, post_body)
2347
- rc, err = PhraseApp.send_request("DELETE", path, reqHelper.ctype, reqHelper.body, 204)
2356
+ rc, err = PhraseApp.send_request("DELETE", path, reqHelper.ctype, reqHelper.body, 200)
2348
2357
  if err != nil
2349
2358
  return nil, err
2350
2359
  end
2351
2360
 
2352
- return err
2361
+ return PhraseApp::ResponseObjects::AffectedResources.new(JSON.load(rc.body)), err
2353
2362
  end
2354
2363
 
2355
2364
  # List all keys for the given project. Alternatively you can POST requests to /search.
@@ -2433,6 +2442,7 @@ end
2433
2442
  # Parameters of type PhraseApp::RequestParams::KeysTagParams
2434
2443
  #
2435
2444
  # == Returns:
2445
+ # PhraseApp::ResponseObjects::AffectedResources
2436
2446
  # err
2437
2447
  def self.keys_tag(project_id, params)
2438
2448
  path = sprintf("/api/v2/projects/%s/keys/tag", project_id)
@@ -2451,12 +2461,12 @@ end
2451
2461
  return nil, err
2452
2462
  end
2453
2463
  reqHelper = PhraseApp::ParamsHelpers::BodyTypeHelper.new(data_hash, post_body)
2454
- rc, err = PhraseApp.send_request("PATCH", path, reqHelper.ctype, reqHelper.body, 204)
2464
+ rc, err = PhraseApp.send_request("PATCH", path, reqHelper.ctype, reqHelper.body, 200)
2455
2465
  if err != nil
2456
2466
  return nil, err
2457
2467
  end
2458
2468
 
2459
- return err
2469
+ return PhraseApp::ResponseObjects::AffectedResources.new(JSON.load(rc.body)), err
2460
2470
  end
2461
2471
 
2462
2472
  # Removes specified tags from keys matching query.
@@ -2468,6 +2478,7 @@ end
2468
2478
  # Parameters of type PhraseApp::RequestParams::KeysUntagParams
2469
2479
  #
2470
2480
  # == Returns:
2481
+ # PhraseApp::ResponseObjects::AffectedResources
2471
2482
  # err
2472
2483
  def self.keys_untag(project_id, params)
2473
2484
  path = sprintf("/api/v2/projects/%s/keys/tag", project_id)
@@ -2486,12 +2497,12 @@ end
2486
2497
  return nil, err
2487
2498
  end
2488
2499
  reqHelper = PhraseApp::ParamsHelpers::BodyTypeHelper.new(data_hash, post_body)
2489
- rc, err = PhraseApp.send_request("DELETE", path, reqHelper.ctype, reqHelper.body, 204)
2500
+ rc, err = PhraseApp.send_request("DELETE", path, reqHelper.ctype, reqHelper.body, 200)
2490
2501
  if err != nil
2491
2502
  return nil, err
2492
2503
  end
2493
2504
 
2494
- return err
2505
+ return PhraseApp::ResponseObjects::AffectedResources.new(JSON.load(rc.body)), err
2495
2506
  end
2496
2507
 
2497
2508
  # Create a new locale.
@@ -2511,7 +2522,7 @@ end
2511
2522
  post_body = nil
2512
2523
 
2513
2524
  if params.present?
2514
- unless params.kind_of?(PhraseApp::RequestParams::LocaleCreateParams)
2525
+ unless params.kind_of?(PhraseApp::RequestParams::LocaleParams)
2515
2526
  raise PhraseApp::ParamsHelpers::ParamsError.new("Expects params to be kind_of PhraseApp::RequestParams::LocaleParams")
2516
2527
  end
2517
2528
  end
@@ -2635,7 +2646,7 @@ end
2635
2646
  post_body = nil
2636
2647
 
2637
2648
  if params.present?
2638
- unless params.kind_of?(PhraseApp::RequestParams::LocaleUpdateParams)
2649
+ unless params.kind_of?(PhraseApp::RequestParams::LocaleParams)
2639
2650
  raise PhraseApp::ParamsHelpers::ParamsError.new("Expects params to be kind_of PhraseApp::RequestParams::LocaleParams")
2640
2651
  end
2641
2652
  end
@@ -2719,7 +2730,7 @@ end
2719
2730
  post_body = nil
2720
2731
 
2721
2732
  if params.present?
2722
- unless params.kind_of?(PhraseApp::RequestParams::OrderCreateParams)
2733
+ unless params.kind_of?(PhraseApp::RequestParams::TranslationOrderParams)
2723
2734
  raise PhraseApp::ParamsHelpers::ParamsError.new("Expects params to be kind_of PhraseApp::RequestParams::TranslationOrderParams")
2724
2735
  end
2725
2736
  end
@@ -2825,7 +2836,7 @@ end
2825
2836
  post_body = nil
2826
2837
 
2827
2838
  if params.present?
2828
- unless params.kind_of?(PhraseApp::RequestParams::ProjectCreateParams)
2839
+ unless params.kind_of?(PhraseApp::RequestParams::ProjectParams)
2829
2840
  raise PhraseApp::ParamsHelpers::ParamsError.new("Expects params to be kind_of PhraseApp::RequestParams::ProjectParams")
2830
2841
  end
2831
2842
  end
@@ -2906,7 +2917,7 @@ end
2906
2917
  post_body = nil
2907
2918
 
2908
2919
  if params.present?
2909
- unless params.kind_of?(PhraseApp::RequestParams::ProjectUpdateParams)
2920
+ unless params.kind_of?(PhraseApp::RequestParams::ProjectParams)
2910
2921
  raise PhraseApp::ParamsHelpers::ParamsError.new("Expects params to be kind_of PhraseApp::RequestParams::ProjectParams")
2911
2922
  end
2912
2923
  end
@@ -2984,7 +2995,7 @@ end
2984
2995
  post_body = nil
2985
2996
 
2986
2997
  if params.present?
2987
- unless params.kind_of?(PhraseApp::RequestParams::StyleguideCreateParams)
2998
+ unless params.kind_of?(PhraseApp::RequestParams::StyleguideParams)
2988
2999
  raise PhraseApp::ParamsHelpers::ParamsError.new("Expects params to be kind_of PhraseApp::RequestParams::StyleguideParams")
2989
3000
  end
2990
3001
  end
@@ -3071,7 +3082,7 @@ end
3071
3082
  post_body = nil
3072
3083
 
3073
3084
  if params.present?
3074
- unless params.kind_of?(PhraseApp::RequestParams::StyleguideUpdateParams)
3085
+ unless params.kind_of?(PhraseApp::RequestParams::StyleguideParams)
3075
3086
  raise PhraseApp::ParamsHelpers::ParamsError.new("Expects params to be kind_of PhraseApp::RequestParams::StyleguideParams")
3076
3087
  end
3077
3088
  end
@@ -3130,7 +3141,7 @@ end
3130
3141
  post_body = nil
3131
3142
 
3132
3143
  if params.present?
3133
- unless params.kind_of?(PhraseApp::RequestParams::TagCreateParams)
3144
+ unless params.kind_of?(PhraseApp::RequestParams::TagParams)
3134
3145
  raise PhraseApp::ParamsHelpers::ParamsError.new("Expects params to be kind_of PhraseApp::RequestParams::TagParams")
3135
3146
  end
3136
3147
  end
@@ -3238,7 +3249,7 @@ end
3238
3249
  post_body = nil
3239
3250
 
3240
3251
  if params.present?
3241
- unless params.kind_of?(PhraseApp::RequestParams::TranslationCreateParams)
3252
+ unless params.kind_of?(PhraseApp::RequestParams::TranslationParams)
3242
3253
  raise PhraseApp::ParamsHelpers::ParamsError.new("Expects params to be kind_of PhraseApp::RequestParams::TranslationParams")
3243
3254
  end
3244
3255
  end
@@ -3629,7 +3640,7 @@ end
3629
3640
  post_body = nil
3630
3641
 
3631
3642
  if params.present?
3632
- unless params.kind_of?(PhraseApp::RequestParams::UploadCreateParams)
3643
+ unless params.kind_of?(PhraseApp::RequestParams::LocaleFileImportParams)
3633
3644
  raise PhraseApp::ParamsHelpers::ParamsError.new("Expects params to be kind_of PhraseApp::RequestParams::LocaleFileImportParams")
3634
3645
  end
3635
3646
  end
@@ -1,3 +1,3 @@
1
1
  module PhraseApp
2
- VERSION = '1.0.17'
2
+ VERSION = '1.0.18'
3
3
  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.0.17
4
+ version: 1.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - PhraseApp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-23 00:00:00.000000000 Z
11
+ date: 2015-08-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: PhraseApp API client libary
14
14
  email: