crowdin-api 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8dd65f417ce9ea45be107ab6278a1415ac82a811
4
- data.tar.gz: 986b314c86e92d3d2ac2e2b8f6858e1d16e6a2d6
3
+ metadata.gz: 693786452e672ae92ccdcd344dfe689f89e47f8e
4
+ data.tar.gz: 74b8e38462eb8d882d5391733b57cb521b9698ee
5
5
  SHA512:
6
- metadata.gz: 5beac248aaf88bf71b2b6c101476a61aa3b2cbb29965c140cb96af303850b4d8a8fa0bdb271a731fa7ecb034b4195ace1ab3f65d6adf4ffe66393503c864da60
7
- data.tar.gz: 01cdb47629037c30d6585d85cf8e14e2013b10cec6e364ad390bdc8cf8a683f7ffafe9fd87a943942a794d97e83dd5d0d0a881c8ba054c1e7591b2116bbf94a3
6
+ metadata.gz: fbe9a4eaeec9ae33a0be109454eb1f3bea728ce175156972b3a83b729849d4dadec23752d9908997fd748b8095fc8525a28b1e0a5543b9d122fe29839bf527d7
7
+ data.tar.gz: 36c455a22e4c8f52895d8de9efa325d9caafc1994b8709c5a6515004e0a88bb5a52358bf86731128ec6551eec00f047d44546d3961bb10e093dfee5ca2a92278
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Crowdin::API
2
2
 
3
- The Crowdin Ruby Client is used to interact with the Crowdin API from Ruby.
3
+ A Ruby interface to the Crowdin API.
4
4
 
5
- For more about the Crowdin API see <http://crowdin.com/page/api>.
5
+ For more about the Crowdin API see <https://crowdin.com/page/api>.
6
6
 
7
7
  > **WARNING**: This is a development version: It contains the latest changes, but may also have severe known issues, including crashes and data loss situations. In fact, it may not work at all.
8
8
 
@@ -42,7 +42,7 @@ Now you can make requests to the api.
42
42
 
43
43
  Add new file to Crowdin project.
44
44
 
45
- Documentation: <http://crowdin.com/page/api/add-file>.
45
+ Documentation: <https://crowdin.com/page/api/add-file>.
46
46
 
47
47
  First parameter is array of files that should be added to Crowdin project.
48
48
  Every file is hash:
@@ -64,7 +64,7 @@ crowdin.add_file(
64
64
 
65
65
  Upload fresh version of your localization file.
66
66
 
67
- Documentation <http://crowdin.com/page/api/update-file>
67
+ Documentation <https://crowdin.com/page/api/update-file>
68
68
 
69
69
  First parameter is array of files that should be updated in Crowdin project.
70
70
  Every file is hash:
@@ -86,7 +86,7 @@ crowdin.update_file(
86
86
 
87
87
  Remove file from Crowdin project.
88
88
 
89
- Documentation <http://crowdin.com/page/api/delete-file>
89
+ Documentation <https://crowdin.com/page/api/delete-file>
90
90
 
91
91
  ```ruby
92
92
  crowdin.delete_file('strings.xml')
@@ -96,7 +96,7 @@ crowdin.delete_file('strings.xml')
96
96
 
97
97
  Create a new directory in Crowdin project.
98
98
 
99
- Documentation: <http://crowdin.com/page/api/add-directory>
99
+ Documentation: <https://crowdin.com/page/api/add-directory>
100
100
 
101
101
  ```ruby
102
102
  crowdin.add_directory('dirname')
@@ -106,7 +106,7 @@ crowdin.add_directory('dirname')
106
106
 
107
107
  Remove directory with nested files from Crowdin project.
108
108
 
109
- Documentation: <http://crowdin.com/page/api/delete-directory>
109
+ Documentation: <https://crowdin.com/page/api/delete-directory>
110
110
 
111
111
  ```ruby
112
112
  crowdin.delete_directory('dirname')
@@ -116,7 +116,7 @@ crowdin.delete_directory('dirname')
116
116
 
117
117
  Upload translations made in a third party software or previously made translations.
118
118
 
119
- Documentation: <http://crowdin.com/page/api/upload-translation>
119
+ Documentation: <https://crowdin.com/page/api/upload-translation>
120
120
 
121
121
  First parameter is array of translated files that should be added to Crowdin project.
122
122
  Every file is hash:
@@ -125,7 +125,7 @@ Every file is hash:
125
125
 
126
126
  Second parameter is target language.
127
127
  With a single call it's possible to upload translations for several files but only into one of the languages.
128
- Check [complete list of Crowdin language codes](http://crowdin.com/page/api/language-codes) that can be used.
128
+ Check [complete list of Crowdin language codes](https://crowdin.com/page/api/language-codes) that can be used.
129
129
 
130
130
  Optional params:
131
131
  * `:import_duplicates` - defines whether to add translation if there is the same translation previously added (default: false)
@@ -147,7 +147,7 @@ crowdin.upload_translation(
147
147
 
148
148
  Download last exported translation package (one target language or all languages as one zip file).
149
149
 
150
- Documentation: <http://crowdin.com/page/api/download>
150
+ Documentation: <https://crowdin.com/page/api/download>
151
151
 
152
152
  First parameter is the language of translation you need or download `all` of them at once.
153
153
 
@@ -159,7 +159,7 @@ crowdin.download_translation('ru', :output => '/path/to/download/ru_RU.zip')
159
159
 
160
160
  Track overall translation and proofreading progress of each target language.
161
161
 
162
- Documentation: <http://crowdin.com/page/api/status>
162
+ Documentation: <https://crowdin.com/page/api/status>
163
163
 
164
164
  ```ruby
165
165
  crowdin.translations_status
@@ -169,7 +169,7 @@ crowdin.translations_status
169
169
 
170
170
  Shows project details and meta information (last translations date, currently uploaded files, target languages etc..).
171
171
 
172
- Documentation: <http://crowdin.com/page/api/info>
172
+ Documentation: <https://crowdin.com/page/api/info>
173
173
 
174
174
  ```ruby
175
175
  crowdin.project_info
@@ -179,7 +179,7 @@ crowdin.project_info
179
179
 
180
180
  Build ZIP archive with the latest translations.
181
181
 
182
- Documentation: <http://crowdin.com/page/api/export>
182
+ Documentation: <https://crowdin.com/page/api/export>
183
183
 
184
184
  ```ruby
185
185
  crowdin.export_translations
@@ -187,46 +187,46 @@ crowdin.export_translations
187
187
 
188
188
  ### Account Projects
189
189
 
190
- Documentation: <http://crowdin.com/page/api/get-projects>
190
+ Documentation: <https://crowdin.com/page/api/get-projects>
191
191
 
192
192
  ### Create Project
193
193
 
194
- Documentation: <http://crowdin.com/page/api/create-project>
194
+ Documentation: <https://crowdin.com/page/api/create-project>
195
195
 
196
196
  ### Edit Project
197
197
 
198
- Documentation: <http://crowdin.com/page/api/edit-project>
198
+ Documentation: <https://crowdin.com/page/api/edit-project>
199
199
 
200
200
  ### Delete Project
201
201
 
202
- Documentation: <http://crowdin.com/page/api/delete-project>
202
+ Documentation: <https://crowdin.com/page/api/delete-project>
203
203
 
204
204
  ### Download Glossary
205
205
 
206
- Documentation: <http://crowdin.com/page/api/download-glossary>
206
+ Documentation: <https://crowdin.com/page/api/download-glossary>
207
207
 
208
208
  ### Upload Glossary
209
209
 
210
- Documentation: <http://crowdin.com/page/api/upload-glossary>
210
+ Documentation: <https://crowdin.com/page/api/upload-glossary>
211
211
 
212
212
  ### Download TM
213
213
 
214
- Documentation: <http://crowdin.com/page/api/download-tm>
214
+ Documentation: <https://crowdin.com/page/api/download-tm>
215
215
 
216
216
  ### Upload TM
217
217
 
218
- Documentation: <http://crowdin.com/page/api/upload-tm>
218
+ Documentation: <https://crowdin.com/page/api/upload-tm>
219
219
 
220
220
  ### Supported Languages
221
221
 
222
- Documentation: <http://crowdin.com/page/api/supported-languages>
222
+ Documentation: <https://crowdin.com/page/api/supported-languages>
223
223
 
224
224
  ## Supported Rubies
225
225
 
226
226
  Tested with the following Ruby versions:
227
227
 
228
- - MRI 1.9.3
229
- - JRuby 1.7.0
228
+ - MRI 2.1.2
229
+ - JRuby 1.7
230
230
 
231
231
  ## Contributing
232
232
 
@@ -240,6 +240,6 @@ Tested with the following Ruby versions:
240
240
 
241
241
  Author: Anton Maminov (anton.maminov@gmail.com)
242
242
 
243
- Copyright: 2012-2014 [crowdin.com](http://crowdin.com/)
243
+ Copyright: 2012-2014 [crowdin.com](https://crowdin.com/)
244
244
 
245
245
  This library is distributed under the MIT license. Please see the LICENSE file.
data/lib/crowdin-api.rb CHANGED
@@ -64,6 +64,7 @@ module Crowdin
64
64
  :json => true
65
65
  }.merge(options[:params])
66
66
 
67
+ RestClient.proxy = ENV['http_proxy'] if ENV['http_proxy']
67
68
  @connection = RestClient::Resource.new(@base_url, options)
68
69
  end
69
70
 
@@ -20,7 +20,7 @@ module Crowdin
20
20
  #
21
21
  # == Request
22
22
  #
23
- # POST http://api.crowdin.com/api/project/{project-identifier}/add-file?key={project-key}
23
+ # POST https://api.crowdin.com/api/project/{project-identifier}/add-file?key={project-key}
24
24
  #
25
25
  def add_file(files, params = {})
26
26
  params[:files] = Hash[files.map{ |f| [
@@ -56,7 +56,7 @@ module Crowdin
56
56
  #
57
57
  # == Request
58
58
  #
59
- # POST http://api.crowdin.com/api/project/{project-identifier}/update-file?key={project-key}
59
+ # POST https://api.crowdin.com/api/project/{project-identifier}/update-file?key={project-key}
60
60
  #
61
61
  def update_file(files, params = {})
62
62
  params[:files] = Hash[files.map{ |f|
@@ -99,7 +99,7 @@ module Crowdin
99
99
  #
100
100
  # == Request
101
101
  #
102
- # POST http://api.crowdin.com/api/project/{project-identifier}/upload-translation?key={project-key}
102
+ # POST https://api.crowdin.com/api/project/{project-identifier}/upload-translation?key={project-key}
103
103
  #
104
104
  def upload_translation(files, language, params = {})
105
105
  params[:files] = Hash[files.map{ |f| [
@@ -121,7 +121,7 @@ module Crowdin
121
121
  #
122
122
  # == Request
123
123
  #
124
- # GET http://api.crowdin.com/api/project/{project-identifier}/download/{package}.zip?key={project-key}
124
+ # GET https://api.crowdin.com/api/project/{project-identifier}/download/{package}.zip?key={project-key}
125
125
  #
126
126
  def download_translation(language = 'all', params = {})
127
127
  request(
@@ -135,7 +135,7 @@ module Crowdin
135
135
  #
136
136
  # == Request
137
137
  #
138
- # POST http://api.crowdin.com/api/project/{project-identifier}/upload-glossary?key={project-key}
138
+ # POST https://api.crowdin.com/api/project/{project-identifier}/upload-glossary?key={project-key}
139
139
  #
140
140
  def upload_glossary(file)
141
141
  # raise "#{path} file does not exist" unless ::File.exist?(path)
@@ -152,7 +152,7 @@ module Crowdin
152
152
  #
153
153
  # == Request
154
154
  #
155
- # POST http://api.crowdin.com/api/project/{project-identifier}/upload-tm?key={project-key}
155
+ # POST https://api.crowdin.com/api/project/{project-identifier}/upload-tm?key={project-key}
156
156
  #
157
157
  def upload_tm(file)
158
158
  file = ::File.open(file, 'rb')
@@ -168,7 +168,7 @@ module Crowdin
168
168
  #
169
169
  # == Request
170
170
  #
171
- # POST http://api.crowdin.com/api/project/{project-identifier}/add-directory?key={project-key}
171
+ # POST https://api.crowdin.com/api/project/{project-identifier}/add-directory?key={project-key}
172
172
  #
173
173
  def add_directory(name)
174
174
  request(
@@ -182,7 +182,7 @@ module Crowdin
182
182
  #
183
183
  # == Request
184
184
  #
185
- # POST http://api.crowdin.com/api/project/{project-identifier}/delete-directory?key={project-key}
185
+ # POST https://api.crowdin.com/api/project/{project-identifier}/delete-directory?key={project-key}
186
186
  #
187
187
  def delete_directory(name)
188
188
  request(
@@ -197,7 +197,7 @@ module Crowdin
197
197
  #
198
198
  # == Request
199
199
  #
200
- # POST http://api.crowdin.com/api/project/{project-identifier}/delete-file?key={project-key}
200
+ # POST https://api.crowdin.com/api/project/{project-identifier}/delete-file?key={project-key}
201
201
  #
202
202
  def delete_file(file)
203
203
  request(
@@ -211,7 +211,7 @@ module Crowdin
211
211
  #
212
212
  # == Request
213
213
  #
214
- # GET http://api.crowdin.com/api/project/{project-identifier}/download-glossary?key={project-key}
214
+ # GET https://api.crowdin.com/api/project/{project-identifier}/download-glossary?key={project-key}
215
215
  #
216
216
  def download_glossary(params = {})
217
217
  request(
@@ -225,7 +225,7 @@ module Crowdin
225
225
  #
226
226
  # == Request
227
227
  #
228
- # GET http://api.crowdin.com/api/project/{project-identifier}/download-tm?key={project-key}
228
+ # GET https://api.crowdin.com/api/project/{project-identifier}/download-tm?key={project-key}
229
229
  #
230
230
  def download_tm(params = {})
231
231
  request(
@@ -239,7 +239,7 @@ module Crowdin
239
239
  #
240
240
  # == Request
241
241
  #
242
- # POST http://api.crowdin.com/api/project/{project-identifier}/export?key={project-key}
242
+ # POST https://api.crowdin.com/api/project/{project-identifier}/export?key={project-key}
243
243
  #
244
244
  def export_translations
245
245
  request(
@@ -253,7 +253,7 @@ module Crowdin
253
253
  #
254
254
  # == Request
255
255
  #
256
- # GET http://api.crowdin.com/api/supported-languages
256
+ # GET https://api.crowdin.com/api/supported-languages
257
257
  #
258
258
  def supported_languages
259
259
  request(
@@ -266,7 +266,7 @@ module Crowdin
266
266
  #
267
267
  # == Request
268
268
  #
269
- # POST http://api.crowdin.com/api/project/{project-identifier}/status?key={project-key}
269
+ # POST https://api.crowdin.com/api/project/{project-identifier}/status?key={project-key}
270
270
  #
271
271
  def translations_status
272
272
  request(
@@ -279,7 +279,7 @@ module Crowdin
279
279
  #
280
280
  # == Request
281
281
  #
282
- # POST http://api.crowdin.com/api/project/{project-identifier}/info?key={project-key}
282
+ # POST https://api.crowdin.com/api/project/{project-identifier}/info?key={project-key}
283
283
  #
284
284
  def project_info
285
285
  request(
@@ -293,7 +293,7 @@ module Crowdin
293
293
  #
294
294
  # == Request
295
295
  #
296
- # POST http://api.crowdin.com/api/account/create-project?account-key={account-key}
296
+ # POST https://api.crowdin.com/api/account/create-project?account-key={account-key}
297
297
  #
298
298
  def create_project(params = {})
299
299
  request(
@@ -307,7 +307,7 @@ module Crowdin
307
307
  #
308
308
  # == Request
309
309
  #
310
- # POST http://api.crowdin.com/api/project/{project-identifier}/edit-project?key={key}
310
+ # POST https://api.crowdin.com/api/project/{project-identifier}/edit-project?key={key}
311
311
  #
312
312
  def edit_project(params = {})
313
313
  request(
@@ -321,7 +321,7 @@ module Crowdin
321
321
  #
322
322
  # == Request
323
323
  #
324
- # POST http://api.crowdin.com/api/project/{project-identifier}/delete-project?key={project-key}
324
+ # POST https://api.crowdin.com/api/project/{project-identifier}/delete-project?key={project-key}
325
325
  #
326
326
  def delete_project
327
327
  request(
@@ -334,7 +334,7 @@ module Crowdin
334
334
  #
335
335
  # == Request
336
336
  #
337
- # GET http://api.crowdin.com/api/account/get-projects?key={account-key}
337
+ # GET https://api.crowdin.com/api/account/get-projects?key={account-key}
338
338
  #
339
339
  def get_projects(login)
340
340
  request(
@@ -1,5 +1,5 @@
1
1
  module Crowdin
2
2
  class API
3
- VERSION = "0.2.4"
3
+ VERSION = "0.2.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crowdin-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Crowdin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-11 00:00:00.000000000 Z
11
+ date: 2014-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client