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 +4 -4
- data/README.md +38 -14
- data/lib/prtscr/version.rb +1 -1
- data/prtscr-0.3.0.gem +0 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 38e1e992030cb5b08f70170cc02ec52f5fc404dd13a0ce3de2c4e0b65033eb71
|
|
4
|
+
data.tar.gz: b50419ea8c87e2abc46381724edd04bef14c4647d98ba334195a0fb09d112b64
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
+

|
|
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/
|
|
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](
|
|
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).
|
data/lib/prtscr/version.rb
CHANGED
data/prtscr-0.3.0.gem
ADDED
|
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.
|
|
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:
|