webpurify_api 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/webpurify_api.rb +1 -0
- data/lib/webpurify_api/base.rb +1 -1
- data/lib/webpurify_api/image.rb +1 -2
- data/lib/webpurify_api/version.rb +1 -1
- data/lib/webpurify_api/video.rb +20 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f10e533c7e7a05fb26ca862ce9c9f9300ea619c
|
4
|
+
data.tar.gz: e1683f7a9d62cd1a09ba83fde3c1a4589de390e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21424eeee0e4f6dbc7d32532b1e326e815ca23948d0135bb6417f3c9c48160764b74523e3b743633b61c805d242e0c32583d00bc5315957beda637d422d35e6f
|
7
|
+
data.tar.gz: 53e281e2203f9e823b977eb11c25c58a466ec809e271a428967f1a0adb15aebdd06d5c78f40fbe800d8240085c887e5a7a6196bc6d43bd37337247dd76607105
|
data/README.md
CHANGED
data/lib/webpurify_api.rb
CHANGED
data/lib/webpurify_api/base.rb
CHANGED
data/lib/webpurify_api/image.rb
CHANGED
@@ -6,8 +6,7 @@ class WebpurifyApi::Image < WebpurifyApi::Base
|
|
6
6
|
# callback url receive a get request with +imgid+ and +status+ parameters
|
7
7
|
# status: 1 = approved , status: 2 = declined
|
8
8
|
def check(url, custom_image_id: nil, callback: nil)
|
9
|
-
|
10
|
-
res
|
9
|
+
do_request(:imgcheck, params: { imgurl: url, customimgid: custom_image_id, callback: callback })
|
11
10
|
end
|
12
11
|
|
13
12
|
def status(custom_image_id: nil, image_id: nil)
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class WebpurifyApi::Video < WebpurifyApi::Base
|
2
|
+
def initialize(api_key: nil, live: nil)
|
3
|
+
super(api_key: api_key, live: live, endpoint: "https://im-api1.webpurify.com/video/services/rest/")
|
4
|
+
end
|
5
|
+
|
6
|
+
# callback url receive a get request with +imgid+ and +status+ parameters
|
7
|
+
# status: 1 = approved , status: 2 = declined
|
8
|
+
def check(url, custom_video_id: nil)
|
9
|
+
do_request(:vidcheck, params: { vidurl: url, customvidid: custom_video_id })
|
10
|
+
end
|
11
|
+
|
12
|
+
def status(video_id: nil, custom_video_id: nil)
|
13
|
+
params = custom_video_id.nil? ? { vidid: video_id } : { customvidid: custom_video_id }
|
14
|
+
do_request(:vidstatus, params: params)
|
15
|
+
end
|
16
|
+
|
17
|
+
def account
|
18
|
+
do_request(:vidaccount)
|
19
|
+
end
|
20
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webpurify_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Olivier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -82,6 +82,7 @@ files:
|
|
82
82
|
- lib/webpurify_api/base.rb
|
83
83
|
- lib/webpurify_api/image.rb
|
84
84
|
- lib/webpurify_api/version.rb
|
85
|
+
- lib/webpurify_api/video.rb
|
85
86
|
- webpurify_api.gemspec
|
86
87
|
homepage: https://github.com/veilleperso/webpurify_api
|
87
88
|
licenses:
|