sightengine 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -2
- data/lib/sightengine/api/responses/face_attributes.rb +1 -1
- data/lib/sightengine/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c53057f6fb51ac5aaa544bd29a7fdc31f936915
|
4
|
+
data.tar.gz: b8317c5c75c48202bbe0ed109a87861cd2754200
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29dd79b8fc3c6e7306d2d699fdc428d007b7f1962549a07812738f7250d353670793764bda2c221affb0e990042f49604e4fa2acdcaf38648896884af38adf10
|
7
|
+
data.tar.gz: 64b29eb8f13243b5bc757adc16cdc8c22d388f781fd3bcdc096456ca60200066bcdfe34dd4504aeb3eff59e364f0b9f12c3e7ebd306afa12bfa6a3f4366de27e
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Sightengine
|
2
2
|
|
3
|
+
![](https://travis-ci.org/leoht/sightengine.svg?branch=master)
|
4
|
+
|
3
5
|
Unofficial wrapper for the [Sightengine](https://sightengine.com/) API
|
4
6
|
which provides image moderation including nudity detection, scammer detection,
|
5
7
|
face attributes, and more.
|
@@ -51,8 +53,8 @@ response.safe? # true
|
|
51
53
|
```ruby
|
52
54
|
response = client.face_attributes("https://sightengine.com/assets/img/examples/example7.jpg")
|
53
55
|
|
54
|
-
response.
|
55
|
-
face = response.
|
56
|
+
response.get_faces.length # 1
|
57
|
+
face = response.get_faces.first
|
56
58
|
|
57
59
|
face.female? # true
|
58
60
|
face.male? # true
|
@@ -77,6 +79,16 @@ response.celebrity? # true
|
|
77
79
|
response.celebrities # [{"name"=>"Daniel Craig", "prob"=>0.99}, {"name"=>"Graham Fellows", "prob"=>0.08}, ...]
|
78
80
|
```
|
79
81
|
|
82
|
+
### Weapons, alcohol and drugs (WAD)
|
83
|
+
|
84
|
+
```ruby
|
85
|
+
response = client.wad("https://sightengine.com/assets/img/examples/example2.jpg")
|
86
|
+
|
87
|
+
response.weapon?
|
88
|
+
response.drugs?
|
89
|
+
response.alcohol?
|
90
|
+
```
|
91
|
+
|
80
92
|
### Multi-models check
|
81
93
|
|
82
94
|
```ruby
|
data/lib/sightengine/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sightengine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Léonard Hetsch
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
149
|
version: '0'
|
150
150
|
requirements: []
|
151
151
|
rubyforge_project:
|
152
|
-
rubygems_version: 2.
|
152
|
+
rubygems_version: 2.6.12
|
153
153
|
signing_key:
|
154
154
|
specification_version: 4
|
155
155
|
summary: Ruby wrapper for the Sightengine image moderation API
|