paperplane-rb 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -2
- data/Gemfile.lock +11 -2
- data/README.md +33 -14
- data/lib/paperplane/version.rb +1 -1
- data/lib/paperplane.rb +4 -0
- data/paperplane.gemspec +1 -0
- metadata +15 -2
- data/sig/paperplane.rbs +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bac605d7028446810334ec5ce9f549ce2a40884aa766dc82d30384145b85bf8
|
4
|
+
data.tar.gz: 1f6055b1cf36e3562861598e7d839a8086ddd03a9cb537bc9954e98532320e7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5880a18a09467a0a9cd48146b10977d842ceb0acd22deca2491dc9466d160d1126a7d140c7daa8d7b70620f1c6adf6da20f38318e8e718bb37934fd1e728f0e
|
7
|
+
data.tar.gz: ed739ace7d040964123f9898115fda612b4c780df711c8d21f396a5f050f4ede22ac2c0a7ee0edb83dd264763eec51c0105445efeafd40ad90e5853668a818d7
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,14 +1,17 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
paperplane-rb (0.1.
|
4
|
+
paperplane-rb (0.1.8)
|
5
5
|
http
|
6
|
+
webmock
|
6
7
|
|
7
8
|
GEM
|
8
9
|
remote: https://rubygems.org/
|
9
10
|
specs:
|
10
11
|
addressable (2.8.1)
|
11
12
|
public_suffix (>= 2.0.2, < 6.0)
|
13
|
+
crack (0.4.5)
|
14
|
+
rexml
|
12
15
|
diff-lcs (1.5.0)
|
13
16
|
domain_name (0.5.20190701)
|
14
17
|
unf (>= 0.0.5, < 1.0.0)
|
@@ -16,6 +19,7 @@ GEM
|
|
16
19
|
ffi-compiler (1.0.1)
|
17
20
|
ffi (>= 1.0.0)
|
18
21
|
rake
|
22
|
+
hashdiff (1.0.1)
|
19
23
|
http (5.1.1)
|
20
24
|
addressable (~> 2.8)
|
21
25
|
http-cookie (~> 1.0)
|
@@ -29,6 +33,7 @@ GEM
|
|
29
33
|
rake (~> 13.0)
|
30
34
|
public_suffix (5.0.1)
|
31
35
|
rake (13.0.6)
|
36
|
+
rexml (3.2.5)
|
32
37
|
rspec (3.12.0)
|
33
38
|
rspec-core (~> 3.12.0)
|
34
39
|
rspec-expectations (~> 3.12.0)
|
@@ -45,12 +50,16 @@ GEM
|
|
45
50
|
unf (0.1.4)
|
46
51
|
unf_ext
|
47
52
|
unf_ext (0.0.8.2)
|
53
|
+
webmock (3.18.1)
|
54
|
+
addressable (>= 2.8.0)
|
55
|
+
crack (>= 0.3.2)
|
56
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
48
57
|
|
49
58
|
PLATFORMS
|
50
59
|
arm64-darwin-22
|
60
|
+
x86_64-linux
|
51
61
|
|
52
62
|
DEPENDENCIES
|
53
|
-
http
|
54
63
|
paperplane-rb!
|
55
64
|
rake (~> 13.0)
|
56
65
|
rspec (~> 3.0)
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# paperplane-rb
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
A simple gem to interact with the Paperplane PDF API. It just has very basic features that I needed quickly. I'll continue to improve this as I need. Feel free to contribute if you'd like!
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
@@ -10,20 +8,41 @@ Install the gem and add to the application's Gemfile by executing:
|
|
10
8
|
|
11
9
|
$ bundle add paperplane
|
12
10
|
|
13
|
-
|
11
|
+
Or add it to your `Gemfile` manually:
|
14
12
|
|
15
|
-
|
13
|
+
```ruby
|
14
|
+
gem 'paperplane'
|
15
|
+
```
|
16
16
|
|
17
17
|
## Usage
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
19
|
+
Initialize the library and set your API key(required) and logger(optional).
|
20
|
+
```ruby
|
21
|
+
require 'paperplane'
|
22
|
+
|
23
|
+
Paperplane.configure do |config|
|
24
|
+
config.api_key = 'your_paperplane_api_key'
|
25
|
+
config.logger = Appsignal::Logger.new("paperplane")
|
26
|
+
end
|
27
|
+
```
|
28
|
+
|
29
|
+
You can now call the different methods:
|
30
|
+
```ruby
|
31
|
+
# Download PDF
|
32
|
+
url = 'https://en.wikipedia.org/wiki/Airplane'
|
33
|
+
output_file = 'example.pdf'
|
34
|
+
PaperplaneAPI.download_pdf(url, output_file)
|
35
|
+
|
36
|
+
# Create Job
|
37
|
+
response = PaperplaneAPI.create_job(url)
|
38
|
+
puts response
|
39
|
+
job_id = response['id']
|
40
|
+
|
41
|
+
# Show Job
|
42
|
+
job = PaperplaneAPI.show_job(job_id)
|
43
|
+
puts job
|
44
|
+
```
|
26
45
|
|
27
46
|
## Contributing
|
28
47
|
|
29
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
48
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/nolyoi/paperplane-rb.
|
data/lib/paperplane/version.rb
CHANGED
data/lib/paperplane.rb
CHANGED
data/paperplane.gemspec
CHANGED
@@ -31,6 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
|
32
32
|
# Uncomment to register a new dependency of your gem
|
33
33
|
spec.add_dependency "http"
|
34
|
+
spec.add_dependency "webmock"
|
34
35
|
|
35
36
|
# For more information and examples about making a new gem, check out our
|
36
37
|
# guide at: https://bundler.io/guides/creating_gem.html
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paperplane-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nolyoi
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: webmock
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
description: A gem to interact with the Paperplane PDF API.
|
28
42
|
email:
|
29
43
|
- nolan@syslogica.io
|
@@ -42,7 +56,6 @@ files:
|
|
42
56
|
- lib/paperplane/error.rb
|
43
57
|
- lib/paperplane/version.rb
|
44
58
|
- paperplane.gemspec
|
45
|
-
- sig/paperplane.rbs
|
46
59
|
homepage: https://github.com/nolyoi
|
47
60
|
licenses: []
|
48
61
|
metadata:
|
data/sig/paperplane.rbs
DELETED