apiverve_workingdays 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 +4 -4
- data/README.md +8 -3
- data/lib/apiverve_workingdays/client.rb +2 -2
- data/lib/apiverve_workingdays.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a64a2cde34d3bf49ea18caadde4b739e731c1da845fca0e579aeda87e22c71f7
|
|
4
|
+
data.tar.gz: 8d0aa06ebb0617bcea5eefff59a81ac6bebd1aab04af80af80275aa01366fb99
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a51baa8d9987877553ccb7bd2c3fad7fb9240fdd0e4fe9673e019cc44d79b1b23f1b3d2adbc98d979994cffff40e07b2d9e014e6a90047afd07d0156c0385859
|
|
7
|
+
data.tar.gz: 443189ff1d80d37449b01cae5403d225cf4e8848bbf7d15bae75b87a17b4c176ca9a757f237858f132fb86500db8d5d9222cb00683ba965426067734d5c206ba
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Working Days API - Ruby Gem
|
|
2
2
|
|
|
3
|
-
Working Days is a working days and business days API that counts the working days and non-working days for any country and month. Pass a two-letter country code and month number to get total counts, working date lists, and non-working days marked with holiday names.
|
|
3
|
+
Working Days is a working days and business days API that counts the working days and non-working days for any country and month. Pass a two-letter country code and month number to get total counts, working date lists, and non-working days marked with holiday names. On paid plans, add a state or region for regional holidays, set a custom weekend, count between any two dates, or add business days to a date.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -38,7 +38,12 @@ client = APIVerve::Workingdays::Client.new(api_key: "YOUR_API_KEY")
|
|
|
38
38
|
response = client.execute({
|
|
39
39
|
country: "US",
|
|
40
40
|
month: 10,
|
|
41
|
-
year: 2026
|
|
41
|
+
year: 2026,
|
|
42
|
+
region: "CA",
|
|
43
|
+
weekend: "fri,sat",
|
|
44
|
+
start: "2026-03-01",
|
|
45
|
+
end: "2026-03-31",
|
|
46
|
+
addDays: 10
|
|
42
47
|
})
|
|
43
48
|
|
|
44
49
|
# Print the response
|
|
@@ -50,7 +55,7 @@ puts response
|
|
|
50
55
|
|
|
51
56
|
```ruby
|
|
52
57
|
begin
|
|
53
|
-
response = client.execute({ country: "US", month: 10, year: 2026 })
|
|
58
|
+
response = client.execute({ country: "US", month: 10, year: 2026, region: "CA", weekend: "fri,sat", start: "2026-03-01", end: "2026-03-31", addDays: 10 })
|
|
54
59
|
puts response["data"]
|
|
55
60
|
rescue APIVerve::Workingdays::ValidationError => e
|
|
56
61
|
puts "Validation error: #{e.errors.join(', ')}"
|
|
@@ -10,7 +10,7 @@ module APIVerve
|
|
|
10
10
|
#
|
|
11
11
|
# @example Basic usage
|
|
12
12
|
# client = APIVerve::Workingdays::Client.new(api_key: "your_api_key")
|
|
13
|
-
# response = client.execute({ country: "US", month: 10, year: 2026 })
|
|
13
|
+
# response = client.execute({ country: "US", month: 10, year: 2026, region: "CA", weekend: "fri,sat", start: "2026-03-01", end: "2026-03-31", addDays: 10 })
|
|
14
14
|
# puts response
|
|
15
15
|
#
|
|
16
16
|
# @see https://apiverve.com/marketplace/workingdays?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 = { 'country' => { type: 'string', required: true, min_length: 2, max_length: 2 }, 'month' => { type: 'integer', required: false, min: 1, max: 12 }, 'year' => { type: 'integer', required: false, min: 2000, max: 2050 } }
|
|
22
|
+
VALIDATION_RULES = { 'country' => { type: 'string', required: true, min_length: 2, max_length: 2 }, 'month' => { type: 'integer', required: false, min: 1, max: 12 }, 'year' => { type: 'integer', required: false, min: 2000, max: 2050 }, 'region' => { type: 'string', required: false, max_length: 5 }, 'weekend' => { type: 'string', required: false, max_length: 60 }, 'start' => { type: 'string', required: false, format: 'date' }, 'end' => { type: 'string', required: false, format: 'date' }, 'addDays' => { type: 'integer', required: false, min: -250, max: 250, format: 'date' } }
|
|
23
23
|
|
|
24
24
|
# Format validation patterns
|
|
25
25
|
FORMAT_PATTERNS = {
|
data/lib/apiverve_workingdays.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: apiverve_workingdays
|
|
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
|
|
@@ -60,7 +60,8 @@ dependencies:
|
|
|
60
60
|
description: Working Days is a working days and business days API that counts the
|
|
61
61
|
working days and non-working days for any country and month. Pass a two-letter country
|
|
62
62
|
code and month number to get total counts, working date lists, and non-working days
|
|
63
|
-
marked with holiday names.
|
|
63
|
+
marked with holiday names. On paid plans, add a state or region for regional holidays,
|
|
64
|
+
set a custom weekend, count between any two dates, or add business days to a date.
|
|
64
65
|
email:
|
|
65
66
|
- hello@apiverve.com
|
|
66
67
|
executables: []
|