apiverve_httpstatuslookup 1.2.4 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bd05fce134462361efb80cd399d2db1b2de0a434b6a95e030c748a45d5f8bb25
4
- data.tar.gz: 9e5ef813aeffb0991d87240e31d8a8bb4afdb9bce4ba75d84a31f9df54741167
3
+ metadata.gz: f037a1740a6a81f074372a07bdc3db80c7149beb16c4d723afba35819bd2499c
4
+ data.tar.gz: ceb3956429d2d09fd5f5356a04d1595e4a60aef49007987932a76f5fe01f4b06
5
5
  SHA512:
6
- metadata.gz: 7b361ad7e3b8c6ae51124cb0689d90378002729e9cab6f79b97001cbf5f4dd723302b20753b310015c466ae2c5c34b2e14faf655d8a519866938efd82bb544c5
7
- data.tar.gz: a97727a36bd0e477b2aab61beace368fc13803287d8dafe003f05d36e124d3feeeac1b5a872f709d26a95a8c611d50e91f310e62c984931912c83c14819e2ecc
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({ code: 404 })
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 = {
@@ -4,6 +4,6 @@ require_relative "apiverve_httpstatuslookup/client"
4
4
 
5
5
  module APIVerve
6
6
  module Httpstatuslookup
7
- VERSION = "1.2.4"
7
+ VERSION = "1.2.5"
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apiverve_httpstatuslookup
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - APIVerve
@@ -59,7 +59,9 @@ dependencies:
59
59
  version: '2.0'
60
60
  description: HTTP Status Code Lookup decodes any HTTP status code by returning its
61
61
  standard name and detailed description. Provide a numeric code to inspect its meaning
62
- 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.
63
65
  email:
64
66
  - hello@apiverve.com
65
67
  executables: []