crowdin-api 0.6.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build-and-publish.yml +30 -0
- data/.github/workflows/test-and-lint.yml +31 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.rubocop.yml +5 -0
- data/.rubocop_todo.yml +118 -0
- data/CODE_OF_CONDUCT.md +128 -0
- data/CONTRIBUTING.md +71 -0
- data/Gemfile +5 -0
- data/LICENSE +1 -1
- data/README.md +104 -282
- data/Rakefile +19 -0
- data/bin/crowdin-console +51 -0
- data/bin/setup +6 -0
- data/crowdin-api.gemspec +30 -0
- data/lib/crowdin-api/api-resources/languages.rb +81 -0
- data/lib/crowdin-api/api-resources/projects.rb +127 -0
- data/lib/crowdin-api/api-resources/source_files.rb +313 -0
- data/lib/crowdin-api/api-resources/storages.rb +102 -0
- data/lib/crowdin-api/api-resources/translation_status.rb +97 -0
- data/lib/crowdin-api/api-resources/translations.rb +166 -0
- data/lib/crowdin-api/client/client.rb +82 -0
- data/lib/crowdin-api/client/configuration.rb +41 -0
- data/lib/crowdin-api/client/version.rb +7 -0
- data/lib/crowdin-api/core/errors.rb +20 -0
- data/lib/crowdin-api/core/payload.rb +26 -0
- data/lib/crowdin-api/core/request.rb +91 -0
- data/lib/crowdin-api.rb +22 -126
- data/spec/core/config-instance_spec.rb +35 -0
- data/spec/crowdin-api_spec.rb +7 -0
- data/spec/spec_helper.rb +3 -0
- metadata +94 -44
- data/lib/crowdin-api/errors.rb +0 -23
- data/lib/crowdin-api/methods.rb +0 -452
- data/lib/crowdin-api/version.rb +0 -5
metadata
CHANGED
@@ -1,140 +1,190 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crowdin-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Crowdin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: open-uri
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.1.0
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 0.2.0
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.1.0
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 0.2.0
|
13
33
|
- !ruby/object:Gem::Dependency
|
14
34
|
name: rest-client
|
15
35
|
requirement: !ruby/object:Gem::Requirement
|
16
36
|
requirements:
|
17
|
-
- - "
|
37
|
+
- - ">="
|
18
38
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
39
|
+
version: 2.0.0
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 2.1.0
|
20
43
|
type: :runtime
|
21
44
|
prerelease: false
|
22
45
|
version_requirements: !ruby/object:Gem::Requirement
|
23
46
|
requirements:
|
24
|
-
- - "
|
47
|
+
- - ">="
|
25
48
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
49
|
+
version: 2.0.0
|
50
|
+
- - "<"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 2.1.0
|
27
53
|
- !ruby/object:Gem::Dependency
|
28
54
|
name: bundler
|
29
55
|
requirement: !ruby/object:Gem::Requirement
|
30
56
|
requirements:
|
31
57
|
- - "~>"
|
32
58
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
59
|
+
version: '2.2'
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 2.2.32
|
34
63
|
type: :development
|
35
64
|
prerelease: false
|
36
65
|
version_requirements: !ruby/object:Gem::Requirement
|
37
66
|
requirements:
|
38
67
|
- - "~>"
|
39
68
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
69
|
+
version: '2.2'
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: 2.2.32
|
41
73
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
74
|
+
name: rake
|
43
75
|
requirement: !ruby/object:Gem::Requirement
|
44
76
|
requirements:
|
45
77
|
- - "~>"
|
46
78
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
79
|
+
version: '13.0'
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 13.0.6
|
48
83
|
type: :development
|
49
84
|
prerelease: false
|
50
85
|
version_requirements: !ruby/object:Gem::Requirement
|
51
86
|
requirements:
|
52
87
|
- - "~>"
|
53
88
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
89
|
+
version: '13.0'
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: 13.0.6
|
55
93
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
94
|
+
name: rspec
|
57
95
|
requirement: !ruby/object:Gem::Requirement
|
58
96
|
requirements:
|
59
97
|
- - "~>"
|
60
98
|
- !ruby/object:Gem::Version
|
61
|
-
version: '3.
|
99
|
+
version: '3.10'
|
62
100
|
type: :development
|
63
101
|
prerelease: false
|
64
102
|
version_requirements: !ruby/object:Gem::Requirement
|
65
103
|
requirements:
|
66
104
|
- - "~>"
|
67
105
|
- !ruby/object:Gem::Version
|
68
|
-
version: '3.
|
106
|
+
version: '3.10'
|
69
107
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
108
|
+
name: rubocop
|
71
109
|
requirement: !ruby/object:Gem::Requirement
|
72
110
|
requirements:
|
73
111
|
- - "~>"
|
74
112
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
76
|
-
- - ">="
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version: 2.0.5
|
113
|
+
version: '1.23'
|
79
114
|
type: :development
|
80
115
|
prerelease: false
|
81
116
|
version_requirements: !ruby/object:Gem::Requirement
|
82
117
|
requirements:
|
83
118
|
- - "~>"
|
84
119
|
- !ruby/object:Gem::Version
|
85
|
-
version: '
|
86
|
-
- - ">="
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: 2.0.5
|
120
|
+
version: '1.23'
|
89
121
|
- !ruby/object:Gem::Dependency
|
90
|
-
name:
|
122
|
+
name: sinatra
|
91
123
|
requirement: !ruby/object:Gem::Requirement
|
92
124
|
requirements:
|
93
125
|
- - "~>"
|
94
126
|
- !ruby/object:Gem::Version
|
95
|
-
version: '
|
96
|
-
- - ">="
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
version: 11.2.2
|
127
|
+
version: '2.1'
|
99
128
|
type: :development
|
100
129
|
prerelease: false
|
101
130
|
version_requirements: !ruby/object:Gem::Requirement
|
102
131
|
requirements:
|
103
132
|
- - "~>"
|
104
133
|
- !ruby/object:Gem::Version
|
105
|
-
version: '
|
106
|
-
- - ">="
|
107
|
-
- !ruby/object:Gem::Version
|
108
|
-
version: 11.2.2
|
134
|
+
version: '2.1'
|
109
135
|
- !ruby/object:Gem::Dependency
|
110
|
-
name:
|
136
|
+
name: webmock
|
111
137
|
requirement: !ruby/object:Gem::Requirement
|
112
138
|
requirements:
|
113
139
|
- - "~>"
|
114
140
|
- !ruby/object:Gem::Version
|
115
|
-
version:
|
141
|
+
version: '3.14'
|
116
142
|
type: :development
|
117
143
|
prerelease: false
|
118
144
|
version_requirements: !ruby/object:Gem::Requirement
|
119
145
|
requirements:
|
120
146
|
- - "~>"
|
121
147
|
- !ruby/object:Gem::Version
|
122
|
-
version:
|
123
|
-
description: Ruby Client for the Crowdin API
|
148
|
+
version: '3.14'
|
149
|
+
description: Ruby Client for the Crowdin API. Documentation - https://support.crowdin.com/api/v2/.
|
124
150
|
email:
|
125
151
|
- support@crowdin.net
|
126
|
-
executables:
|
152
|
+
executables:
|
153
|
+
- crowdin-console
|
127
154
|
extensions: []
|
128
|
-
extra_rdoc_files:
|
129
|
-
- README.md
|
130
|
-
- LICENSE
|
155
|
+
extra_rdoc_files: []
|
131
156
|
files:
|
157
|
+
- ".github/workflows/build-and-publish.yml"
|
158
|
+
- ".github/workflows/test-and-lint.yml"
|
159
|
+
- ".gitignore"
|
160
|
+
- ".rspec"
|
161
|
+
- ".rubocop.yml"
|
162
|
+
- ".rubocop_todo.yml"
|
163
|
+
- CODE_OF_CONDUCT.md
|
164
|
+
- CONTRIBUTING.md
|
165
|
+
- Gemfile
|
132
166
|
- LICENSE
|
133
167
|
- README.md
|
168
|
+
- Rakefile
|
169
|
+
- bin/crowdin-console
|
170
|
+
- bin/setup
|
171
|
+
- crowdin-api.gemspec
|
134
172
|
- lib/crowdin-api.rb
|
135
|
-
- lib/crowdin-api/
|
136
|
-
- lib/crowdin-api/
|
137
|
-
- lib/crowdin-api/
|
173
|
+
- lib/crowdin-api/api-resources/languages.rb
|
174
|
+
- lib/crowdin-api/api-resources/projects.rb
|
175
|
+
- lib/crowdin-api/api-resources/source_files.rb
|
176
|
+
- lib/crowdin-api/api-resources/storages.rb
|
177
|
+
- lib/crowdin-api/api-resources/translation_status.rb
|
178
|
+
- lib/crowdin-api/api-resources/translations.rb
|
179
|
+
- lib/crowdin-api/client/client.rb
|
180
|
+
- lib/crowdin-api/client/configuration.rb
|
181
|
+
- lib/crowdin-api/client/version.rb
|
182
|
+
- lib/crowdin-api/core/errors.rb
|
183
|
+
- lib/crowdin-api/core/payload.rb
|
184
|
+
- lib/crowdin-api/core/request.rb
|
185
|
+
- spec/core/config-instance_spec.rb
|
186
|
+
- spec/crowdin-api_spec.rb
|
187
|
+
- spec/spec_helper.rb
|
138
188
|
homepage: https://github.com/crowdin/crowdin-api/
|
139
189
|
licenses:
|
140
190
|
- MIT
|
@@ -154,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
204
|
- !ruby/object:Gem::Version
|
155
205
|
version: '0'
|
156
206
|
requirements: []
|
157
|
-
rubygems_version: 3.0.3
|
207
|
+
rubygems_version: 3.0.3.1
|
158
208
|
signing_key:
|
159
209
|
specification_version: 4
|
160
210
|
summary: Client library to manage translations on Crowdin
|
data/lib/crowdin-api/errors.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
module Crowdin
|
2
|
-
class API
|
3
|
-
|
4
|
-
module Errors
|
5
|
-
class Error < StandardError
|
6
|
-
attr_reader :error_code
|
7
|
-
attr_reader :error_message
|
8
|
-
attr_reader :message
|
9
|
-
|
10
|
-
def initialize(error_code, error_message)
|
11
|
-
@error_code = error_code.to_i
|
12
|
-
@error_message = error_message
|
13
|
-
@message = "#{error_code}: #{error_message}"
|
14
|
-
end
|
15
|
-
|
16
|
-
def to_s
|
17
|
-
@message
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
23
|
-
end
|