apiverve_randomjoke 1.2.2 → 1.2.4
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 +5 -5
- data/lib/apiverve_randomjoke/client.rb +2 -2
- data/lib/apiverve_randomjoke.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 56e7f32cf2b58fcf4423fe86c3e88f689a492774d6825012d06d69fc4fd5be87
|
|
4
|
+
data.tar.gz: fc17ac5e1ec764bb0d34c3e125a34445500cf12ba6ab6b5cb26d9c91124c4580
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1d37f599bd110fcd5d5683a8dc3f3bb20e8a8e6979c72bb613bf289ada85bdc83807a875d482a11d3bd4263f9ab4b9c8e5da220e9ee3aae5ec1970d466c3b000
|
|
7
|
+
data.tar.gz: 005afc3150d5744bffea5db00c2cbd4a25cba2521c9d2628335efcc07d21fa7ccf916e45d1764555e28026d2cb1681066e35b0f118565650d11330b9fbf88ea0
|
data/README.md
CHANGED
|
@@ -35,7 +35,7 @@ require 'apiverve_randomjoke'
|
|
|
35
35
|
client = APIVerve::Randomjoke::Client.new(api_key: "YOUR_API_KEY")
|
|
36
36
|
|
|
37
37
|
# Make a request
|
|
38
|
-
response = client.execute
|
|
38
|
+
response = client.execute({ safe: true })
|
|
39
39
|
|
|
40
40
|
# Print the response
|
|
41
41
|
puts response
|
|
@@ -46,7 +46,7 @@ puts response
|
|
|
46
46
|
|
|
47
47
|
```ruby
|
|
48
48
|
begin
|
|
49
|
-
response = client.execute({
|
|
49
|
+
response = client.execute({ safe: true })
|
|
50
50
|
puts response["data"]
|
|
51
51
|
rescue APIVerve::Randomjoke::ValidationError => e
|
|
52
52
|
puts "Validation error: #{e.errors.join(', ')}"
|
|
@@ -73,9 +73,9 @@ client = APIVerve::Randomjoke::Client.new(
|
|
|
73
73
|
"status": "ok",
|
|
74
74
|
"error": null,
|
|
75
75
|
"data": {
|
|
76
|
-
"score":
|
|
77
|
-
"setup": "Why
|
|
78
|
-
"punchline": "
|
|
76
|
+
"score": 9,
|
|
77
|
+
"setup": "Why did the stonemason break up with the female con artist?",
|
|
78
|
+
"punchline": "She took him for granite."
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
```
|
|
@@ -10,7 +10,7 @@ module APIVerve
|
|
|
10
10
|
#
|
|
11
11
|
# @example Basic usage
|
|
12
12
|
# client = APIVerve::Randomjoke::Client.new(api_key: "your_api_key")
|
|
13
|
-
# response = client.execute({})
|
|
13
|
+
# response = client.execute({ safe: true })
|
|
14
14
|
# puts response
|
|
15
15
|
#
|
|
16
16
|
# @see https://apiverve.com/marketplace/randomjoke?utm_source=ruby&utm_medium=referral&utm_content=readme
|
|
@@ -19,7 +19,7 @@ module APIVerve
|
|
|
19
19
|
DEFAULT_TIMEOUT = 30
|
|
20
20
|
|
|
21
21
|
# Validation rules for parameters
|
|
22
|
-
VALIDATION_RULES = {}
|
|
22
|
+
VALIDATION_RULES = { 'safe' => { type: 'boolean', required: false } }
|
|
23
23
|
|
|
24
24
|
# Format validation patterns
|
|
25
25
|
FORMAT_PATTERNS = {
|
data/lib/apiverve_randomjoke.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: apiverve_randomjoke
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- APIVerve
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: faraday
|
|
@@ -78,7 +77,6 @@ metadata:
|
|
|
78
77
|
source_code_uri: https://github.com/apiverve/randomjoke-API/tree/main/ruby
|
|
79
78
|
changelog_uri: https://apiverve.com/changelog
|
|
80
79
|
documentation_uri: https://docs.apiverve.com/ref/randomjoke
|
|
81
|
-
post_install_message:
|
|
82
80
|
rdoc_options: []
|
|
83
81
|
require_paths:
|
|
84
82
|
- lib
|
|
@@ -93,8 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
93
91
|
- !ruby/object:Gem::Version
|
|
94
92
|
version: '0'
|
|
95
93
|
requirements: []
|
|
96
|
-
rubygems_version:
|
|
97
|
-
signing_key:
|
|
94
|
+
rubygems_version: 4.0.23
|
|
98
95
|
specification_version: 4
|
|
99
96
|
summary: Random Joke API - Ruby Client
|
|
100
97
|
test_files: []
|