crowdin-api 0.2.2 → 0.2.3

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: 6fc3e6ce99176c2e43fe93292f96253687aea7f6
4
- data.tar.gz: ec88ff09da3da4fcffdcbb1bb08e58b12a1817b7
3
+ metadata.gz: 07e8e480a4712d12ffbf8a8b349ed36aeaf6d2e1
4
+ data.tar.gz: 1426963732d80b4127bed533c4592b787c13b008
5
5
  SHA512:
6
- metadata.gz: 2ddef5cb15eb1ab063d9e8e96ef89fb029cce895ca5ed827d06fb33aac75e924f105d03eb0b05e905b4fe6ab64226748775a5514ef67d1781c80736a7ddc350b
7
- data.tar.gz: f17b2f18e3b42302357f6988073abc05820eace9dd49c8898da5eb96ae53fe51151901b2c1efd5ee9f23800d931ff074acb38b6aff2c14058f2f4c9ee8606a5c
6
+ metadata.gz: 9a1920b1622a1ced74b1386055988f4f738094a0ef37a651d0bc2e993582d00d42344ad2abf8268bd65bb0a8ed455c9eac34bc5e768be19b2898416ad9938424
7
+ data.tar.gz: 5bbb48d9f0efc08ae1d4d166fd60fff02ae16b6d1ccbbf3e15b099cebdcbbb74de2483675b66db0b62030112fd4b5a10d671e4ea7f317c3fb378b56d2a5e8c0f
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  The Crowdin Ruby Client is used to interact with the Crowdin API from Ruby.
4
4
 
5
- For more about the Crowdin API see <http://crowdin.net/page/api>.
5
+ For more about the Crowdin API see <http://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.net/page/api/add-file>.
45
+ Documentation: <http://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.net/page/api/update-file>
67
+ Documentation <http://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.net/page/api/delete-file>
89
+ Documentation <http://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.net/page/api/add-directory>
99
+ Documentation: <http://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.net/page/api/delete-directory>
109
+ Documentation: <http://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.net/page/api/upload-translation>
119
+ Documentation: <http://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.net/page/api/language-codes) that can be used.
128
+ Check [complete list of Crowdin language codes](http://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.net/page/api/download>
150
+ Documentation: <http://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.net/page/api/status>
162
+ Documentation: <http://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.net/page/api/info>
172
+ Documentation: <http://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.net/page/api/export>
182
+ Documentation: <http://crowdin.com/page/api/export>
183
183
 
184
184
  ```ruby
185
185
  crowdin.export_translations
@@ -187,39 +187,39 @@ crowdin.export_translations
187
187
 
188
188
  ### Account Projects
189
189
 
190
- Documentation: <http://crowdin.net/page/api/get-projects>
190
+ Documentation: <http://crowdin.com/page/api/get-projects>
191
191
 
192
192
  ### Create Project
193
193
 
194
- Documentation: <http://crowdin.net/page/api/create-project>
194
+ Documentation: <http://crowdin.com/page/api/create-project>
195
195
 
196
196
  ### Edit Project
197
197
 
198
- Documentation: <http://crowdin.net/page/api/edit-project>
198
+ Documentation: <http://crowdin.com/page/api/edit-project>
199
199
 
200
200
  ### Delete Project
201
201
 
202
- Documentation: <http://crowdin.net/page/api/delete-project>
202
+ Documentation: <http://crowdin.com/page/api/delete-project>
203
203
 
204
204
  ### Download Glossary
205
205
 
206
- Documentation: <http://crowdin.net/page/api/download-glossary>
206
+ Documentation: <http://crowdin.com/page/api/download-glossary>
207
207
 
208
208
  ### Upload Glossary
209
209
 
210
- Documentation: <http://crowdin.net/page/api/upload-glossary>
210
+ Documentation: <http://crowdin.com/page/api/upload-glossary>
211
211
 
212
212
  ### Download TM
213
213
 
214
- Documentation: <http://crowdin.net/page/api/download-tm>
214
+ Documentation: <http://crowdin.com/page/api/download-tm>
215
215
 
216
216
  ### Upload TM
217
217
 
218
- Documentation: <http://crowdin.net/page/api/upload-tm>
218
+ Documentation: <http://crowdin.com/page/api/upload-tm>
219
219
 
220
220
  ### Supported Languages
221
221
 
222
- Documentation: <http://crowdin.net/page/api/supported-languages>
222
+ Documentation: <http://crowdin.com/page/api/supported-languages>
223
223
 
224
224
  ## Supported Rubies
225
225
 
@@ -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.net](http://crowdin.net/)
243
+ Copyright: 2012-2014 [crowdin.com](http://crowdin.com/)
244
244
 
245
245
  This library is distributed under the MIT license. Please see the LICENSE file.
@@ -6,7 +6,7 @@ require "crowdin-api/errors"
6
6
  require "crowdin-api/methods"
7
7
  require "crowdin-api/version"
8
8
 
9
- # The Crowdin::API library is used for interactions with a crowdin.net website.
9
+ # The Crowdin::API library is used for interactions with a crowdin.com website.
10
10
  #
11
11
  # == Example
12
12
  #
@@ -38,7 +38,7 @@ module Crowdin
38
38
  @api_key = options.delete(:api_key)
39
39
  @project_id = options.delete(:project_id)
40
40
  @account_key = options.delete(:account_key)
41
- @base_url = options.delete(:base_url) || 'http://api.crowdin.net'
41
+ @base_url = options.delete(:base_url) || 'http://api.crowdin.com'
42
42
 
43
43
  @log = nil
44
44
 
@@ -3,7 +3,7 @@ module Crowdin
3
3
  # site for a full explaination of what each of the Crowdin api methods
4
4
  # expect and perform.
5
5
  #
6
- # http://crowdin.net/page/api
6
+ # http://crowdin.com/page/api
7
7
 
8
8
  class API
9
9
 
@@ -20,7 +20,7 @@ module Crowdin
20
20
  #
21
21
  # == Request
22
22
  #
23
- # POST http://api.crowdin.net/api/project/{project-identifier}/add-file?key={project-key}
23
+ # POST http://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.net/api/project/{project-identifier}/update-file?key={project-key}
59
+ # POST http://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.net/api/project/{project-identifier}/upload-translation?key={project-key}
102
+ # POST http://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.net/api/project/{project-identifier}/download/{package}.zip?key={project-key}
124
+ # GET http://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.net/api/project/{project-identifier}/upload-glossary?key={project-key}
138
+ # POST http://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.net/api/project/{project-identifier}/upload-tm?key={project-key}
155
+ # POST http://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.net/api/project/{project-identifier}/add-directory?key={project-key}
171
+ # POST http://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.net/api/project/{project-identifier}/delete-directory?key={project-key}
185
+ # POST http://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.net/api/project/{project-identifier}/delete-file?key={project-key}
200
+ # POST http://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.net/api/project/{project-identifier}/download-glossary?key={project-key}
214
+ # GET http://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.net/api/project/{project-identifier}/download-tm?key={project-key}
228
+ # GET http://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.net/api/project/{project-identifier}/export?key={project-key}
242
+ # POST http://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.net/api/supported-languages
256
+ # GET http://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.net/api/project/{project-identifier}/status?key={project-key}
269
+ # POST http://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.net/api/project/{project-identifier}/info?key={project-key}
282
+ # POST http://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.net/api/account/create-project?account-key={account-key}
296
+ # POST http://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.net/api/project/{project-identifier}/edit-project?key={key}
310
+ # POST http://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.net/api/project/{project-identifier}/delete-project?key={project-key}
324
+ # POST http://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.net/api/account/get-projects?key={account-key}
337
+ # GET http://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.2"
3
+ VERSION = "0.2.3"
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.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Crowdin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-19 00:00:00.000000000 Z
11
+ date: 2014-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client