apiverve_httpstatuslookup 1.2.3 → 1.2.5
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 +13 -4
- data/lib/apiverve_httpstatuslookup/client.rb +2 -2
- data/lib/apiverve_httpstatuslookup.rb +1 -1
- metadata +6 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f037a1740a6a81f074372a07bdc3db80c7149beb16c4d723afba35819bd2499c
|
|
4
|
+
data.tar.gz: ceb3956429d2d09fd5f5356a04d1595e4a60aef49007987932a76f5fe01f4b06
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d4fb8d9ce4c2a4736ebfef939c16194df5de89f5abf2b9a2d5c0243f5c5512109406b93981229feb50b72cf2b56c1ed7667449fb0cb9f56e9b289edfb3190211
|
|
7
|
+
data.tar.gz: 5fec0fe86c555d2052373e83160d553c8aeae8189f6da2df75299bbe0fe18243cd2da2befe516902e756d9b32b5f72a09f63586f2e030039c2136b3e04109f34
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# HTTP Status Code Lookup API - Ruby Gem
|
|
2
2
|
|
|
3
|
-
HTTP Status Code Lookup decodes any HTTP status code by returning its standard name and detailed description. Provide a numeric code to inspect its meaning and response behavior across standard ranges.
|
|
3
|
+
HTTP Status Code Lookup decodes any HTTP status code by returning its standard name and detailed description. Provide a numeric code to inspect its meaning and response behavior across standard ranges, and add details=true for a link to the defining RFC section, plus on paid plans its retry and caching behavior and the headers that go with it.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -35,7 +35,10 @@ require 'apiverve_httpstatuslookup'
|
|
|
35
35
|
client = APIVerve::Httpstatuslookup::Client.new(api_key: "YOUR_API_KEY")
|
|
36
36
|
|
|
37
37
|
# Make a request
|
|
38
|
-
response = client.execute({
|
|
38
|
+
response = client.execute({
|
|
39
|
+
code: 404,
|
|
40
|
+
details: true
|
|
41
|
+
})
|
|
39
42
|
|
|
40
43
|
# Print the response
|
|
41
44
|
puts response
|
|
@@ -46,7 +49,7 @@ puts response
|
|
|
46
49
|
|
|
47
50
|
```ruby
|
|
48
51
|
begin
|
|
49
|
-
response = client.execute({ code: 404 })
|
|
52
|
+
response = client.execute({ code: 404, details: true })
|
|
50
53
|
puts response["data"]
|
|
51
54
|
rescue APIVerve::Httpstatuslookup::ValidationError => e
|
|
52
55
|
puts "Validation error: #{e.errors.join(', ')}"
|
|
@@ -80,7 +83,13 @@ client = APIVerve::Httpstatuslookup::Client.new(
|
|
|
80
83
|
"is_error": true,
|
|
81
84
|
"is_success": false,
|
|
82
85
|
"is_redirect": false,
|
|
83
|
-
"is_informational": false
|
|
86
|
+
"is_informational": false,
|
|
87
|
+
"registry_name": "Not Found",
|
|
88
|
+
"spec": "RFC 9110, Section 15.5.5",
|
|
89
|
+
"spec_url": "https://www.rfc-editor.org/rfc/rfc9110#section-15.5.5",
|
|
90
|
+
"is_retryable": false,
|
|
91
|
+
"is_cacheable_by_default": true,
|
|
92
|
+
"related_headers": []
|
|
84
93
|
}
|
|
85
94
|
}
|
|
86
95
|
```
|
|
@@ -10,7 +10,7 @@ module APIVerve
|
|
|
10
10
|
#
|
|
11
11
|
# @example Basic usage
|
|
12
12
|
# client = APIVerve::Httpstatuslookup::Client.new(api_key: "your_api_key")
|
|
13
|
-
# response = client.execute({ code: 404 })
|
|
13
|
+
# response = client.execute({ code: 404, details: true })
|
|
14
14
|
# puts response
|
|
15
15
|
#
|
|
16
16
|
# @see https://apiverve.com/marketplace/httpstatuslookup?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 = { 'code' => { type: 'integer', required: true, min: 100, max: 599 } }
|
|
22
|
+
VALIDATION_RULES = { 'code' => { type: 'integer', required: true, min: 100, max: 599 }, 'details' => { type: 'boolean', required: false } }
|
|
23
23
|
|
|
24
24
|
# Format validation patterns
|
|
25
25
|
FORMAT_PATTERNS = {
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: apiverve_httpstatuslookup
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.5
|
|
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
|
|
@@ -60,7 +59,9 @@ dependencies:
|
|
|
60
59
|
version: '2.0'
|
|
61
60
|
description: HTTP Status Code Lookup decodes any HTTP status code by returning its
|
|
62
61
|
standard name and detailed description. Provide a numeric code to inspect its meaning
|
|
63
|
-
and response behavior across standard ranges
|
|
62
|
+
and response behavior across standard ranges, and add details=true for a link to
|
|
63
|
+
the defining RFC section, plus on paid plans its retry and caching behavior and
|
|
64
|
+
the headers that go with it.
|
|
64
65
|
email:
|
|
65
66
|
- hello@apiverve.com
|
|
66
67
|
executables: []
|
|
@@ -79,7 +80,6 @@ metadata:
|
|
|
79
80
|
source_code_uri: https://github.com/apiverve/httpstatuslookup-API/tree/main/ruby
|
|
80
81
|
changelog_uri: https://apiverve.com/changelog
|
|
81
82
|
documentation_uri: https://docs.apiverve.com/ref/httpstatuslookup
|
|
82
|
-
post_install_message:
|
|
83
83
|
rdoc_options: []
|
|
84
84
|
require_paths:
|
|
85
85
|
- lib
|
|
@@ -94,8 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
94
94
|
- !ruby/object:Gem::Version
|
|
95
95
|
version: '0'
|
|
96
96
|
requirements: []
|
|
97
|
-
rubygems_version:
|
|
98
|
-
signing_key:
|
|
97
|
+
rubygems_version: 4.0.23
|
|
99
98
|
specification_version: 4
|
|
100
99
|
summary: HTTP Status Code Lookup API - Ruby Client
|
|
101
100
|
test_files: []
|