apiverve_moonphases 1.2.3 → 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 +28 -14
- data/lib/apiverve_moonphases/client.rb +2 -2
- data/lib/apiverve_moonphases.rb +1 -1
- metadata +7 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 327f72c408136eeee9935569acc8b9638734e5f41db9563e37e87e645cce9cda
|
|
4
|
+
data.tar.gz: 1cd9d528ac4d079df8e15531d8313e16878190916b05be2669a1be0cb1854490
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d7b89a92996ba84924e88327d546e4d79eb2cdec77a95c190a7467fb38d60319accf6b1aeaba134143c743d3c6b5806b4a722558452126bda7e38ccc49e04080
|
|
7
|
+
data.tar.gz: dc5f9bc05360d001ca116c3c4c939545f46e5c43d0a69e07628b9d99e846c3c708bcb2ba2b4609e7dba7c19bc216798764488e0e248fb4f18786fe03ee1158b1
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Moon Phases API - Ruby Gem
|
|
2
2
|
|
|
3
|
-
Moon Phases calculates the current lunar phase, illumination percentage, and lunar age for today. It reports waxing or waning status, Earth-moon distance, and emoji representations, while paid plans add custom date queries and full moon
|
|
3
|
+
Moon Phases calculates the current lunar phase, illumination percentage, and lunar age for today. It reports waxing or waning status, Earth-moon distance in Earth radii and kilometers, the next principal phase and emoji representations, while paid plans add custom date queries and the dates of the next new moon, first quarter, full moon and last quarter.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -35,7 +35,10 @@ require 'apiverve_moonphases'
|
|
|
35
35
|
client = APIVerve::Moonphases::Client.new(api_key: "YOUR_API_KEY")
|
|
36
36
|
|
|
37
37
|
# Make a request
|
|
38
|
-
response = client.execute({
|
|
38
|
+
response = client.execute({
|
|
39
|
+
today: true,
|
|
40
|
+
phases: 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({ today: true })
|
|
52
|
+
response = client.execute({ today: true, phases: true })
|
|
50
53
|
puts response["data"]
|
|
51
54
|
rescue APIVerve::Moonphases::ValidationError => e
|
|
52
55
|
puts "Validation error: #{e.errors.join(', ')}"
|
|
@@ -73,19 +76,30 @@ client = APIVerve::Moonphases::Client.new(
|
|
|
73
76
|
"status": "ok",
|
|
74
77
|
"error": null,
|
|
75
78
|
"data": {
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
+
"date": "2026-10-27",
|
|
80
|
+
"phase": "Full",
|
|
81
|
+
"phaseEmoji": "🌕",
|
|
82
|
+
"illumination": 98.8,
|
|
79
83
|
"waxing": false,
|
|
80
84
|
"waning": true,
|
|
81
|
-
"lunarAge":
|
|
82
|
-
"lunarAgePercent": 0.
|
|
83
|
-
"lunationNumber":
|
|
84
|
-
"lunarDistance":
|
|
85
|
-
"nextFullMoon": "2026-
|
|
86
|
-
"lastFullMoon": "
|
|
87
|
-
"daysToFullMoon":
|
|
88
|
-
"daysSinceFullMoon":
|
|
85
|
+
"lunarAge": 15.775469393347242,
|
|
86
|
+
"lunarAgePercent": 0.534207769602574,
|
|
87
|
+
"lunationNumber": 1285,
|
|
88
|
+
"lunarDistance": 57.48396905317442,
|
|
89
|
+
"nextFullMoon": "2026-11-24T17:29:23.611Z",
|
|
90
|
+
"lastFullMoon": "2026-10-26T04:45:20.833Z",
|
|
91
|
+
"daysToFullMoon": 29,
|
|
92
|
+
"daysSinceFullMoon": 1,
|
|
93
|
+
"lunarDistanceKm": 366230,
|
|
94
|
+
"nextPhase": "Last Quarter",
|
|
95
|
+
"nextPhaseDate": "2026-11-02T13:56:21.527Z",
|
|
96
|
+
"daysToNextPhase": 6,
|
|
97
|
+
"nextNewMoon": "2026-11-09T23:07:22.222Z",
|
|
98
|
+
"lastNewMoon": "2026-10-11T10:23:19.444Z",
|
|
99
|
+
"daysToNewMoon": 14,
|
|
100
|
+
"daysSinceNewMoon": 16,
|
|
101
|
+
"nextFirstQuarter": "2026-11-17T08:18:22.916Z",
|
|
102
|
+
"nextLastQuarter": "2026-11-02T13:56:21.527Z"
|
|
89
103
|
}
|
|
90
104
|
}
|
|
91
105
|
```
|
|
@@ -10,7 +10,7 @@ module APIVerve
|
|
|
10
10
|
#
|
|
11
11
|
# @example Basic usage
|
|
12
12
|
# client = APIVerve::Moonphases::Client.new(api_key: "your_api_key")
|
|
13
|
-
# response = client.execute({ today: true })
|
|
13
|
+
# response = client.execute({ today: true, phases: true })
|
|
14
14
|
# puts response
|
|
15
15
|
#
|
|
16
16
|
# @see https://apiverve.com/marketplace/moonphases?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 = { 'today' => { type: 'boolean', required: false } }
|
|
22
|
+
VALIDATION_RULES = { 'today' => { type: 'boolean', required: false }, 'phases' => { type: 'boolean', required: false } }
|
|
23
23
|
|
|
24
24
|
# Format validation patterns
|
|
25
25
|
FORMAT_PATTERNS = {
|
data/lib/apiverve_moonphases.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: apiverve_moonphases
|
|
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
|
|
@@ -59,9 +58,10 @@ dependencies:
|
|
|
59
58
|
- !ruby/object:Gem::Version
|
|
60
59
|
version: '2.0'
|
|
61
60
|
description: Moon Phases calculates the current lunar phase, illumination percentage,
|
|
62
|
-
and lunar age for today. It reports waxing or waning status, Earth-moon distance
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
and lunar age for today. It reports waxing or waning status, Earth-moon distance
|
|
62
|
+
in Earth radii and kilometers, the next principal phase and emoji representations,
|
|
63
|
+
while paid plans add custom date queries and the dates of the next new moon, first
|
|
64
|
+
quarter, full moon and last quarter.
|
|
65
65
|
email:
|
|
66
66
|
- hello@apiverve.com
|
|
67
67
|
executables: []
|
|
@@ -80,7 +80,6 @@ metadata:
|
|
|
80
80
|
source_code_uri: https://github.com/apiverve/moonphases-API/tree/main/ruby
|
|
81
81
|
changelog_uri: https://apiverve.com/changelog
|
|
82
82
|
documentation_uri: https://docs.apiverve.com/ref/moonphases
|
|
83
|
-
post_install_message:
|
|
84
83
|
rdoc_options: []
|
|
85
84
|
require_paths:
|
|
86
85
|
- lib
|
|
@@ -95,8 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
95
94
|
- !ruby/object:Gem::Version
|
|
96
95
|
version: '0'
|
|
97
96
|
requirements: []
|
|
98
|
-
rubygems_version:
|
|
99
|
-
signing_key:
|
|
97
|
+
rubygems_version: 4.0.23
|
|
100
98
|
specification_version: 4
|
|
101
99
|
summary: Moon Phases API - Ruby Client
|
|
102
100
|
test_files: []
|