browshot 1.16.0 → 1.29.0

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
- SHA1:
3
- metadata.gz: b028681c4d0960152ecc9202204806a51fe50c46
4
- data.tar.gz: 40fd0ccc8878200afe4f52d56c1d275f8a446d2f
2
+ SHA256:
3
+ metadata.gz: 14957db7ed4c0e0a8e8374a6e437c3aa27c00ea20371aeef6029401bbacaa4dc
4
+ data.tar.gz: 61eb5c503f0caa0d984ba91061b7d0310fb15116ccde26ac8db4f5215b4ff589
5
5
  SHA512:
6
- metadata.gz: c05b5fb8570efe864ec45acb4afb0d9c73aaac3dcfdc5b06ad8241e9e26df40eda540b4d7800748156a478aacfc92b7e0154b2a5715aedfeeb1e78d8a9544326
7
- data.tar.gz: 19cdc44a170a87d70cbddba7141102ee2c957aca6946506de600a403018626508959d4a77978711a34999fbfab2afff965bf0ac812546fa4c27f8045fc99738a
6
+ metadata.gz: 2c26bc76264c9ac15e6600d50ce1e8d5ab3e3cb0f1d091d7deadb6b015bff81972397ec3f94229f9fc55d93133da8018add4b400db42d141c88387a704a823fe
7
+ data.tar.gz: 0472af3d9e3d98fc8074349675a7f8b82934fa5f4eb18f2222e2ed35e548f9ef54aa2293313d02596d99a0c5e7d0552d507da60cc49de8fe14641ca54af46bdd
data/Gemfile CHANGED
@@ -6,4 +6,5 @@ gem "url", ">= 0"
6
6
 
7
7
  group :test do
8
8
  gem 'shoulda'
9
+ gem 'test-unit'
9
10
  end
data/lib/browshot.rb CHANGED
@@ -39,7 +39,7 @@ class Browshot
39
39
 
40
40
  # Return the API version handled by the library. Note that this library can usually handle new arguments in requests without requiring an update.
41
41
  def api_version()
42
- return "1.16"
42
+ return "1.29"
43
43
  end
44
44
 
45
45
  # Retrieve a screenshot with one call. See {https://browshot.com/api/documentation#simple} for the full list of possible arguments.
@@ -242,6 +242,32 @@ class Browshot
242
242
  return return_reply('batch/info', parameters)
243
243
  end
244
244
 
245
+ #Crawl a domain. See http://browshot.com/api/documentation#bcrawl_create for the response format.
246
+ #
247
+ # See http://browshot.com/api/documentation#crawl_create for the full list of possible arguments.
248
+ #
249
+ # @param id [Integer] Instance ID
250
+ # @param domain [String] Domain to crawl
251
+ # @param url [String] URL to start with
252
+ def crawl_create(id=0, file='', parameters={})
253
+ parameters[:instance_id] = id
254
+ parameters[:domain] = domain
255
+ parameters[:url] = url
256
+
257
+ return return_reply('crawl/create', parameters)
258
+ end
259
+
260
+ # Get information about a screenshot crawl requested previously. See {https://browshot.com/api/documentation#crawl_info} for the response format.
261
+ #
262
+ # See http://browshot.com/api/documentation#crawl_info for the full list of possible arguments.
263
+ #
264
+ # @param id [Integer] Crawl ID
265
+ def crawl_info(id=0, parameters={})
266
+ parameters[:id] = id
267
+
268
+ return return_reply('crawl/info', parameters)
269
+ end
270
+
245
271
 
246
272
  # Return information about the user account. See {https://browshot.com/api/documentation#account_info} for the response format.
247
273
  def account_info(parameters={})
@@ -14,7 +14,7 @@ class TestBrowshot < Test::Unit::TestCase
14
14
  end
15
15
 
16
16
  should "get the API version" do
17
- assert_equal '1.16', @browshot.api_version()
17
+ assert_equal '1.29', @browshot.api_version()
18
18
  end
19
19
 
20
20
  should "get a screenshot with the simple method" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: browshot
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.0
4
+ version: 1.29.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien Sobrier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-01 00:00:00.000000000 Z
11
+ date: 2023-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: test-unit
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
97
111
  description: Library for the Browshot API
98
112
  email: julien@sobrier.net
99
113
  executables: []
@@ -125,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
139
  version: '0'
126
140
  requirements: []
127
141
  rubyforge_project:
128
- rubygems_version: 2.4.5
142
+ rubygems_version: 2.7.6.3
129
143
  signing_key:
130
144
  specification_version: 4
131
145
  summary: Take website screenshots with Browshot