moderation_api 2.6.1 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/README.md +1 -1
- data/lib/moderation_api/models/content_submit_params.rb +22 -6
- data/lib/moderation_api/models/content_submit_response.rb +11 -3
- data/lib/moderation_api/version.rb +1 -1
- data/rbi/moderation_api/models/content_submit_params.rbi +42 -10
- data/rbi/moderation_api/models/content_submit_response.rbi +21 -5
- data/sig/moderation_api/models/content_submit_params.rbs +24 -8
- data/sig/moderation_api/models/content_submit_response.rbs +14 -4
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8aaebffde7676c6bab1ee4a7ccf4aa86e4d71f98a1d5080fd38e20ab592478dc
|
|
4
|
+
data.tar.gz: 6400c47241e6d071371ce55cac78c93f6042c0e562468deb0c749ff2c651302f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e66cb25d949652a025fcdac5ce3d3f090ae04cdc2a738ccd199947f9dd0e4ff8e41ea08b9b08f14d982889599c1d627ee67870937381365aaebb070eaafe9fd7
|
|
7
|
+
data.tar.gz: d297d4ca34616dea70d6e28c3bd774d27ff5f2b968cf90161c08af9342d0227d2edd7d04201dbb60e03464796d7348f0b244197a319eecd772b47a2b80b4d824
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.7.0 (2026-02-20)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v2.6.1...v2.7.0](https://github.com/moderation-api/sdk-ruby/compare/v2.6.1...v2.7.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([4779766](https://github.com/moderation-api/sdk-ruby/commit/477976687b0d43cf7cfc3fd1c69d2327d9ddd1e4))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Chores
|
|
13
|
+
|
|
14
|
+
* **internal:** remove mock server code ([6fff870](https://github.com/moderation-api/sdk-ruby/commit/6fff870033a043b5d08560715a1a4bd9c7b3d9ce))
|
|
15
|
+
|
|
3
16
|
## 2.6.1 (2026-02-07)
|
|
4
17
|
|
|
5
18
|
Full Changelog: [v2.6.0...v2.6.1](https://github.com/moderation-api/sdk-ruby/compare/v2.6.0...v2.6.1)
|
data/README.md
CHANGED
|
@@ -141,15 +141,23 @@ module ModerationAPI
|
|
|
141
141
|
# @return [Symbol, :image]
|
|
142
142
|
required :type, const: :image
|
|
143
143
|
|
|
144
|
+
# @!attribute data
|
|
145
|
+
# Base64-encoded image data
|
|
146
|
+
#
|
|
147
|
+
# @return [String, nil]
|
|
148
|
+
optional :data, String
|
|
149
|
+
|
|
144
150
|
# @!attribute url
|
|
145
151
|
# A public URL of the image content
|
|
146
152
|
#
|
|
147
|
-
# @return [String]
|
|
148
|
-
|
|
153
|
+
# @return [String, nil]
|
|
154
|
+
optional :url, String
|
|
149
155
|
|
|
150
|
-
# @!method initialize(url
|
|
156
|
+
# @!method initialize(data: nil, url: nil, type: :image)
|
|
151
157
|
# Image
|
|
152
158
|
#
|
|
159
|
+
# @param data [String] Base64-encoded image data
|
|
160
|
+
#
|
|
153
161
|
# @param url [String] A public URL of the image content
|
|
154
162
|
#
|
|
155
163
|
# @param type [Symbol, :image]
|
|
@@ -257,15 +265,23 @@ module ModerationAPI
|
|
|
257
265
|
# @return [Symbol, :image]
|
|
258
266
|
required :type, const: :image
|
|
259
267
|
|
|
268
|
+
# @!attribute data
|
|
269
|
+
# Base64-encoded image data
|
|
270
|
+
#
|
|
271
|
+
# @return [String, nil]
|
|
272
|
+
optional :data, String
|
|
273
|
+
|
|
260
274
|
# @!attribute url
|
|
261
275
|
# A public URL of the image content
|
|
262
276
|
#
|
|
263
|
-
# @return [String]
|
|
264
|
-
|
|
277
|
+
# @return [String, nil]
|
|
278
|
+
optional :url, String
|
|
265
279
|
|
|
266
|
-
# @!method initialize(url
|
|
280
|
+
# @!method initialize(data: nil, url: nil, type: :image)
|
|
267
281
|
# Image
|
|
268
282
|
#
|
|
283
|
+
# @param data [String] Base64-encoded image data
|
|
284
|
+
#
|
|
269
285
|
# @param url [String] A public URL of the image content
|
|
270
286
|
#
|
|
271
287
|
# @param type [Symbol, :image]
|
|
@@ -267,15 +267,23 @@ module ModerationAPI
|
|
|
267
267
|
# @return [Symbol, :image]
|
|
268
268
|
required :type, const: :image
|
|
269
269
|
|
|
270
|
+
# @!attribute data
|
|
271
|
+
# Base64-encoded image data
|
|
272
|
+
#
|
|
273
|
+
# @return [String, nil]
|
|
274
|
+
optional :data, String
|
|
275
|
+
|
|
270
276
|
# @!attribute url
|
|
271
277
|
# A public URL of the image content
|
|
272
278
|
#
|
|
273
|
-
# @return [String]
|
|
274
|
-
|
|
279
|
+
# @return [String, nil]
|
|
280
|
+
optional :url, String
|
|
275
281
|
|
|
276
|
-
# @!method initialize(url
|
|
282
|
+
# @!method initialize(data: nil, url: nil, type: :image)
|
|
277
283
|
# Image
|
|
278
284
|
#
|
|
285
|
+
# @param data [String] Base64-encoded image data
|
|
286
|
+
#
|
|
279
287
|
# @param url [String] A public URL of the image content
|
|
280
288
|
#
|
|
281
289
|
# @param type [Symbol, :image]
|
|
@@ -363,20 +363,36 @@ module ModerationAPI
|
|
|
363
363
|
sig { returns(Symbol) }
|
|
364
364
|
attr_accessor :type
|
|
365
365
|
|
|
366
|
+
# Base64-encoded image data
|
|
367
|
+
sig { returns(T.nilable(String)) }
|
|
368
|
+
attr_reader :data
|
|
369
|
+
|
|
370
|
+
sig { params(data: String).void }
|
|
371
|
+
attr_writer :data
|
|
372
|
+
|
|
366
373
|
# A public URL of the image content
|
|
367
|
-
sig { returns(String) }
|
|
368
|
-
|
|
374
|
+
sig { returns(T.nilable(String)) }
|
|
375
|
+
attr_reader :url
|
|
376
|
+
|
|
377
|
+
sig { params(url: String).void }
|
|
378
|
+
attr_writer :url
|
|
369
379
|
|
|
370
380
|
# Image
|
|
371
|
-
sig
|
|
381
|
+
sig do
|
|
382
|
+
params(data: String, url: String, type: Symbol).returns(
|
|
383
|
+
T.attached_class
|
|
384
|
+
)
|
|
385
|
+
end
|
|
372
386
|
def self.new(
|
|
387
|
+
# Base64-encoded image data
|
|
388
|
+
data: nil,
|
|
373
389
|
# A public URL of the image content
|
|
374
|
-
url
|
|
390
|
+
url: nil,
|
|
375
391
|
type: :image
|
|
376
392
|
)
|
|
377
393
|
end
|
|
378
394
|
|
|
379
|
-
sig { override.returns({ type: Symbol, url: String }) }
|
|
395
|
+
sig { override.returns({ type: Symbol, data: String, url: String }) }
|
|
380
396
|
def to_hash
|
|
381
397
|
end
|
|
382
398
|
end
|
|
@@ -570,22 +586,38 @@ module ModerationAPI
|
|
|
570
586
|
sig { returns(Symbol) }
|
|
571
587
|
attr_accessor :type
|
|
572
588
|
|
|
589
|
+
# Base64-encoded image data
|
|
590
|
+
sig { returns(T.nilable(String)) }
|
|
591
|
+
attr_reader :data
|
|
592
|
+
|
|
593
|
+
sig { params(data: String).void }
|
|
594
|
+
attr_writer :data
|
|
595
|
+
|
|
573
596
|
# A public URL of the image content
|
|
574
|
-
sig { returns(String) }
|
|
575
|
-
|
|
597
|
+
sig { returns(T.nilable(String)) }
|
|
598
|
+
attr_reader :url
|
|
599
|
+
|
|
600
|
+
sig { params(url: String).void }
|
|
601
|
+
attr_writer :url
|
|
576
602
|
|
|
577
603
|
# Image
|
|
578
604
|
sig do
|
|
579
|
-
params(url: String, type: Symbol).returns(
|
|
605
|
+
params(data: String, url: String, type: Symbol).returns(
|
|
606
|
+
T.attached_class
|
|
607
|
+
)
|
|
580
608
|
end
|
|
581
609
|
def self.new(
|
|
610
|
+
# Base64-encoded image data
|
|
611
|
+
data: nil,
|
|
582
612
|
# A public URL of the image content
|
|
583
|
-
url
|
|
613
|
+
url: nil,
|
|
584
614
|
type: :image
|
|
585
615
|
)
|
|
586
616
|
end
|
|
587
617
|
|
|
588
|
-
sig
|
|
618
|
+
sig do
|
|
619
|
+
override.returns({ type: Symbol, data: String, url: String })
|
|
620
|
+
end
|
|
589
621
|
def to_hash
|
|
590
622
|
end
|
|
591
623
|
end
|
|
@@ -558,22 +558,38 @@ module ModerationAPI
|
|
|
558
558
|
sig { returns(Symbol) }
|
|
559
559
|
attr_accessor :type
|
|
560
560
|
|
|
561
|
+
# Base64-encoded image data
|
|
562
|
+
sig { returns(T.nilable(String)) }
|
|
563
|
+
attr_reader :data
|
|
564
|
+
|
|
565
|
+
sig { params(data: String).void }
|
|
566
|
+
attr_writer :data
|
|
567
|
+
|
|
561
568
|
# A public URL of the image content
|
|
562
|
-
sig { returns(String) }
|
|
563
|
-
|
|
569
|
+
sig { returns(T.nilable(String)) }
|
|
570
|
+
attr_reader :url
|
|
571
|
+
|
|
572
|
+
sig { params(url: String).void }
|
|
573
|
+
attr_writer :url
|
|
564
574
|
|
|
565
575
|
# Image
|
|
566
576
|
sig do
|
|
567
|
-
params(url: String, type: Symbol).returns(
|
|
577
|
+
params(data: String, url: String, type: Symbol).returns(
|
|
578
|
+
T.attached_class
|
|
579
|
+
)
|
|
568
580
|
end
|
|
569
581
|
def self.new(
|
|
582
|
+
# Base64-encoded image data
|
|
583
|
+
data: nil,
|
|
570
584
|
# A public URL of the image content
|
|
571
|
-
url
|
|
585
|
+
url: nil,
|
|
572
586
|
type: :image
|
|
573
587
|
)
|
|
574
588
|
end
|
|
575
589
|
|
|
576
|
-
sig
|
|
590
|
+
sig do
|
|
591
|
+
override.returns({ type: Symbol, data: String, url: String })
|
|
592
|
+
end
|
|
577
593
|
def to_hash
|
|
578
594
|
end
|
|
579
595
|
end
|
|
@@ -111,16 +111,22 @@ module ModerationAPI
|
|
|
111
111
|
def to_hash: -> { text: String, type: :text }
|
|
112
112
|
end
|
|
113
113
|
|
|
114
|
-
type image = { type: :image, url: String }
|
|
114
|
+
type image = { type: :image, data: String, url: String }
|
|
115
115
|
|
|
116
116
|
class Image < ModerationAPI::Internal::Type::BaseModel
|
|
117
117
|
attr_accessor type: :image
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
attr_reader data: String?
|
|
120
|
+
|
|
121
|
+
def data=: (String) -> String
|
|
122
|
+
|
|
123
|
+
attr_reader url: String?
|
|
124
|
+
|
|
125
|
+
def url=: (String) -> String
|
|
120
126
|
|
|
121
|
-
def initialize: (url: String, ?type: :image) -> void
|
|
127
|
+
def initialize: (?data: String, ?url: String, ?type: :image) -> void
|
|
122
128
|
|
|
123
|
-
def to_hash: -> { type: :image, url: String }
|
|
129
|
+
def to_hash: -> { type: :image, data: String, url: String }
|
|
124
130
|
end
|
|
125
131
|
|
|
126
132
|
type video = { type: :video, url: String }
|
|
@@ -189,16 +195,26 @@ module ModerationAPI
|
|
|
189
195
|
def to_hash: -> { text: String, type: :text }
|
|
190
196
|
end
|
|
191
197
|
|
|
192
|
-
type image = { type: :image, url: String }
|
|
198
|
+
type image = { type: :image, data: String, url: String }
|
|
193
199
|
|
|
194
200
|
class Image < ModerationAPI::Internal::Type::BaseModel
|
|
195
201
|
attr_accessor type: :image
|
|
196
202
|
|
|
197
|
-
|
|
203
|
+
attr_reader data: String?
|
|
204
|
+
|
|
205
|
+
def data=: (String) -> String
|
|
206
|
+
|
|
207
|
+
attr_reader url: String?
|
|
208
|
+
|
|
209
|
+
def url=: (String) -> String
|
|
198
210
|
|
|
199
|
-
def initialize: (
|
|
211
|
+
def initialize: (
|
|
212
|
+
?data: String,
|
|
213
|
+
?url: String,
|
|
214
|
+
?type: :image
|
|
215
|
+
) -> void
|
|
200
216
|
|
|
201
|
-
def to_hash: -> { type: :image, url: String }
|
|
217
|
+
def to_hash: -> { type: :image, data: String, url: String }
|
|
202
218
|
end
|
|
203
219
|
|
|
204
220
|
type video = { type: :video, url: String }
|
|
@@ -183,16 +183,26 @@ module ModerationAPI
|
|
|
183
183
|
def to_hash: -> { text: String, type: :text }
|
|
184
184
|
end
|
|
185
185
|
|
|
186
|
-
type image = { type: :image, url: String }
|
|
186
|
+
type image = { type: :image, data: String, url: String }
|
|
187
187
|
|
|
188
188
|
class Image < ModerationAPI::Internal::Type::BaseModel
|
|
189
189
|
attr_accessor type: :image
|
|
190
190
|
|
|
191
|
-
|
|
191
|
+
attr_reader data: String?
|
|
192
|
+
|
|
193
|
+
def data=: (String) -> String
|
|
194
|
+
|
|
195
|
+
attr_reader url: String?
|
|
196
|
+
|
|
197
|
+
def url=: (String) -> String
|
|
192
198
|
|
|
193
|
-
def initialize: (
|
|
199
|
+
def initialize: (
|
|
200
|
+
?data: String,
|
|
201
|
+
?url: String,
|
|
202
|
+
?type: :image
|
|
203
|
+
) -> void
|
|
194
204
|
|
|
195
|
-
def to_hash: -> { type: :image, url: String }
|
|
205
|
+
def to_hash: -> { type: :image, data: String, url: String }
|
|
196
206
|
end
|
|
197
207
|
|
|
198
208
|
type video = { type: :video, url: String }
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: moderation_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Moderation API
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-02-
|
|
11
|
+
date: 2026-02-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|