prtscr 0.3.0 → 0.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd71d32117b01be234eeefb0c6b9b431cbcc27d9fd018653d53e29f32a2b24cb
4
- data.tar.gz: e5562258a66c4b6b3f306acb98f6c1d24da45654965436b867aae80511686a99
3
+ metadata.gz: 38e1e992030cb5b08f70170cc02ec52f5fc404dd13a0ce3de2c4e0b65033eb71
4
+ data.tar.gz: b50419ea8c87e2abc46381724edd04bef14c4647d98ba334195a0fb09d112b64
5
5
  SHA512:
6
- metadata.gz: 0b963b49b70cd584acb469af715f5b084a4d4b04a2d03b3c10d3385a1be112a3076533d2767b5e881c6a6d5e458b465bf6e77a564b199cb97005a256ed5c2425
7
- data.tar.gz: abd3af24c81ed508b58a9a3830d9e9121c7dbefeb9e7daa6ae4188a34a0c6242f0f61d69b9b629c1177678a6449d970012247db1b7394c8e06bdbe9ec1808385
6
+ metadata.gz: cd2476f735ff5f3c6acdcaa56dab6ad382db2c9efe37a8003657f45b7a0be53ff1342a368ba069e9e65e18a5376e7b2a45adae6e6202e71567f5becf49935e31
7
+ data.tar.gz: 559443436ff9a093762226ab6825e053e1ca920ef846530e3aa1bcf62fde1c066b29570dfeb304516cd15cf09d3be4d6413c7cab74eeabca2d59ccef195e352b
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
- # Prtscr
1
+ # Prtscr.ru API gem
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/prtscr`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ This gem is a lib for [PrtScr.ru](https://prtscr.ru/) API (website screenshot).
6
4
 
7
5
  ## Installation
8
6
 
@@ -14,7 +12,7 @@ gem 'prtscr'
14
12
 
15
13
  And then execute:
16
14
 
17
- $ bundle install
15
+ $ bundle
18
16
 
19
17
  Or install it yourself as:
20
18
 
@@ -22,23 +20,49 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ run the next line of code:
24
+
25
+ ```ruby
26
+ Prtscr.get(url: 'https://duckduckgo.com', width: 1280, height: 1024, scale: 350, key: 'YOUR_KEY_HERE', secret: 'YOUR_SECRET_HERE', format: 'jpg')
27
+ ```
28
+
29
+ And get something like:
30
+
31
+ ```
32
+ https://prtscr.ru/v3/screenshot.jpg?url=https%3A%2F%2Fduckduckgo.com%2F&key=2gi_io4l&sign=f162b32357ece5f1489352cbb40c9b4d&width=1280&height=1024&scale=350
33
+ ```
34
+
35
+ Having previous line, you can use html img tag:
36
+
37
+ ![Google website screenshot](https://prtscr.ru/v3/screenshot.jpg?url=https%3A%2F%2Fduckduckgo.com%2F&key=2gi_io4l&sign=f162b32357ece5f1489352cbb40c9b4d&width=1280&height=1024&scale=350)
38
+
39
+ ### Available options
40
+
41
+ **url**: URL encoded Address
42
+
43
+ **width**: Browser width, px
44
+
45
+ **height**: Browser height, px
46
+
47
+ **scale**: Screenshot scale for width, px
48
+
49
+ **key**: Your Key
50
+
51
+ **secret**: Your Secret
52
+
53
+ **format**: Screenshot extension
54
+
55
+ **key** and **secret** options you can obtain at [PrtScr.ru](https://prtscr.ru/)
26
56
 
27
57
  ## Development
28
58
 
29
59
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
60
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
61
  ## Contributing
34
62
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/prtscr. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/prtscr/blob/master/CODE_OF_CONDUCT.md).
63
+ Bug reports and pull requests are welcome on GitHub at https://github.com/vickodin/prtscr.
36
64
 
37
65
 
38
66
  ## License
39
67
 
40
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
41
-
42
- ## Code of Conduct
43
-
44
- Everyone interacting in the Prtscr project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/prtscr/blob/master/CODE_OF_CONDUCT.md).
68
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Prtscr
4
- VERSION = '0.3.0'
4
+ VERSION = '0.3.1'
5
5
  end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prtscr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - vickodin
@@ -34,6 +34,7 @@ files:
34
34
  - lib/prtscr/v2.rb
35
35
  - lib/prtscr/v3.rb
36
36
  - lib/prtscr/version.rb
37
+ - prtscr-0.3.0.gem
37
38
  - prtscr.gemspec
38
39
  homepage: https://github.com/vickodin/prtscr
39
40
  licenses: