parseapi 1.10.3 → 1.10.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 +7 -21
- data/lib/parseapi/client.rb +1 -33
- data/lib/parseapi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 333df640e7140867b7d014471e91afac5a07c34d805e8d9da9281d9f6dfa96d3
|
|
4
|
+
data.tar.gz: 9b68b174f5579f57a255b7a447ceafb09cd55962b4f649a1ab238a6fba113787
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fb485bad77954f0b25eaba5dd5f5b935712fbb61879420792c44f995f871f070c678b439f5c7907d774e4c12bcbf05744ad1d36051fd36541a8849f82bc93dbb
|
|
7
|
+
data.tar.gz: 415c5be9723d35283bee0e35180f4d79e7e68ae9eb48c2a6587062851fc584f521baf4b0251765c873704f572722644c80c3711c22614bf60536d2d9cbd82d9d
|
data/README.md
CHANGED
|
@@ -42,7 +42,7 @@ Pass `country` when a postal code or national phone number needs disambiguation.
|
|
|
42
42
|
|
|
43
43
|
Results are plain data. Pass a returned code or coordinate to another operation when the task needs it. Check nullable values before composing the next call.
|
|
44
44
|
|
|
45
|
-
Use `parse.postal('28202', country: 'US', deep: true)` for US ZIP tax references. `deep.tax` names the levy and `deep.tax_rate` is a percentage, so `7.9` means 7.9%. The state, county, city and special components explain that combined rate. An exact address can differ. Country and state lookups provide their own geographic reference rates, which should not be added to the ZIP rate. `nil` means unknown and `0` means known zero.
|
|
45
|
+
Use `parse.postal('28202', country: 'US', deep: true)` for US ZIP tax references. `deep.tax` names the levy and `deep.tax_rate` is a percentage, so `7.9` means 7.9%. The state, county, city and special components explain that combined rate. An exact address can differ. Country and state lookups provide their own geographic reference rates, which should not be added to the ZIP rate. `nil` means unknown and `0` means known zero.
|
|
46
46
|
|
|
47
47
|
## Company directory
|
|
48
48
|
|
|
@@ -111,8 +111,6 @@ parse.state_districts('NC', country: 'US')
|
|
|
111
111
|
parse.district('37081')
|
|
112
112
|
parse.continent('NA')
|
|
113
113
|
parse.continent_countries('NA')
|
|
114
|
-
parse.currency('USD')
|
|
115
|
-
parse.currency_rate('USD', 'EUR')
|
|
116
114
|
parse.language('en')
|
|
117
115
|
parse.name('BILLY OSHALL')
|
|
118
116
|
parse.name('Andrea', country: 'IT', deep: true)
|
|
@@ -131,7 +129,6 @@ parse.weather(40.7128, -74.006)
|
|
|
131
129
|
parse.weather(40.7128, -74.006, deep: true, date: '2026-09-01')
|
|
132
130
|
parse.domain('example.com')
|
|
133
131
|
parse.asn('AS13335')
|
|
134
|
-
parse.mac('00:1B:63:84:45:E6')
|
|
135
132
|
parse.mx('example.com')
|
|
136
133
|
parse.dns('example.com')
|
|
137
134
|
parse.dns('_dmarc.example.com', type: 'TXT')
|
|
@@ -160,9 +157,9 @@ Choose display names for one request:
|
|
|
160
157
|
parse.country('DE', lang: 'fr')
|
|
161
158
|
```
|
|
162
159
|
|
|
163
|
-
`lang` is optional on geography lookups and their lists/searches,
|
|
160
|
+
`lang` is optional on geography lookups and their lists/searches, Language, Date, Time/Timezone, Emoji lookup/search. IP, ASN and national Company number lookups also accept it for their geographic labels. Codes, native names, quantities and response structure retain their meanings. Source coverage determines which labels are translated; unavailable labels use the API's documented fallback.
|
|
164
161
|
|
|
165
|
-
The next call keeps its usual default unless it also supplies `lang`. Existing `deep` rules still apply. Date `format`
|
|
162
|
+
The next call keeps its usual default unless it also supplies `lang`. Existing `deep` rules still apply. Date `format` remains an explicit input-parsing control.
|
|
166
163
|
|
|
167
164
|
## Time
|
|
168
165
|
|
|
@@ -211,21 +208,10 @@ Timezone discovery accepts country, IANA area, exact signed offset, abbreviation
|
|
|
211
208
|
|
|
212
209
|
Source deep adds `standard_offset`, `standard_offset_seconds`, signed `dst_offset_seconds` and `season`. Seasonal adjustments can be negative. `season` describes the current DST-flag interval, or the next within 400 days, with actual before/after transition facts and signed `change_seconds`. Unknown boundaries remain null. These fields are optional and nullable, and destination deep stays compact.
|
|
213
210
|
|
|
214
|
-
## Measurements
|
|
215
|
-
|
|
216
|
-
```ruby
|
|
217
|
-
result = parse.measure('5 ft 11 in', to: 'cm')
|
|
218
|
-
units = parse.measure_units(unit: 'm')
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
`amount` is a decimal string, such as `"180.34"`. Without `to`, the API returns the canonical unit for the measurement type. Pass `locale` for number formatting and `system` (`us` or `imperial`) when a customary unit needs context. Ambiguous input returns `valid: false`, a `reason`, and available `choices`. Invalid or incompatible target units use the normal API error.
|
|
222
|
-
|
|
223
|
-
Successful HTTP JSON contains `measure`, `valid`, `type`, `amount`, and `unit`. Invalid input adds `reason`. `choices` appears only when unit alternatives are available.
|
|
224
|
-
|
|
225
|
-
Unit discovery accepts optional `query`, `type`, and `unit` filters. `unit` selects compatible targets. Omit the filters for the reviewed catalog. Both operations use pooled requests.
|
|
226
|
-
|
|
227
211
|
## Place statistics and optional detail
|
|
228
212
|
|
|
213
|
+
Country Core contains the everyday reference: `name`, `name_full`, `name_local`, demonym and country codes, continent, region and subregion, currency, calling code, `flag`, language and timezone codes, borders, bloc memberships and `capital: { name, lat, lon }`. Paid Deep adds specialist detail, including population, total area and national statistics. `gdp_usd` and `gdp_per_capita_usd` are current US dollars; `population_growth_percent`, `urban_population_percent` and `internet_users_percent` use a 0–100 percent scale (growth can be negative or exceed 100). GDP per person and these three percentages round once to two decimals in the API response. `elevation_average` is average terrain elevation in meters; `lowest_point.elevation` and `highest_point.elevation` keep their point-specific meaning. Unknown stays null and a known zero stays zero. Country tax references are grouped once as `deep.tax: { name, rate }`; the rate remains a percentage. Read capital from the Core object and read the tax name and rate from the Deep tax object.
|
|
214
|
+
|
|
229
215
|
Australian postal lookups include core `localities` with suburb choices (`city`, `state`, `state_name`) on every plan. Null or an omitted field means unknown, while `[]` means the reviewed reference has no eligible choices. `city` stays null when the source is ambiguous, even if there is only one eligible choice. Let the user select their suburb and keep manual entry available. These are geographic choices, not mailing-address verification. [G-NAF source, adaptations and licence](https://parseapi.com/legal/attribution#postal-au).
|
|
230
216
|
|
|
231
217
|
Postal and District paid profiles include `deep.property_tax` where supported. It contains `annual_median`, `currency` and `period`: median annual property tax payable on owner-occupied homes in the statistical area. The amount is adjusted to the final year of the reporting period (`YYYY-YYYY`). This is an area statistic, not a rate or an individual property bill. Unsupported, missing and censored estimates are null.
|
|
@@ -237,7 +223,7 @@ property_tax = place.dig('deep', 'property_tax')
|
|
|
237
223
|
|
|
238
224
|
Read `population` as the source’s count for that place boundary. Keep missing or null values unknown and preserve a known zero. State district lists include each district’s population. Postal nearby and distance detail remains metropolitan associations only. Continent population stays in core.
|
|
239
225
|
|
|
240
|
-
Country deep includes `land_area` and `water_area` in km2, `coastline` in km, and
|
|
226
|
+
Country deep includes `land_area` and `water_area` in km2, `coastline` in km, and `elevation_average` in meters. `lowest_point` and `highest_point` contain a nullable `name` and an `elevation` in metres. Values below sea level are negative. Missing or null values stay unknown, and zero stays zero.
|
|
241
227
|
|
|
242
228
|
Point returns the timezone ID with the core location. Its optional deep detail adds terrain and compact nearest-city context on every plan. A nearest city is null when none is within 200 km.
|
|
243
229
|
|
|
@@ -264,7 +250,7 @@ Choose enrichment for the question you need answered.
|
|
|
264
250
|
| IP | Richer IP fields included with a paid plan. No separate check meter. |
|
|
265
251
|
| Domain | Registration dates, registrar, status and DNSSEC, included with a paid plan. Use `dns` for DNS records and `mx` for mail routing. |
|
|
266
252
|
| Email | A metered mailbox check with deliverability, catch-all, status, reason and address hints, using included email checks or enabled on-demand usage. |
|
|
267
|
-
| Phone, Time, Date,
|
|
253
|
+
| Phone, Time, Date, Language, Emoji, Point | Optional detail in the same pooled request on every plan. |
|
|
268
254
|
| Country, State, District, City, Postal | The place profile on paid plans, including demographic and tax facts where held. |
|
|
269
255
|
| Name, Industry | Name evidence or the industry definition profile on paid plans. |
|
|
270
256
|
| Company | The complete product detail bag on paid plans. |
|
data/lib/parseapi/client.rb
CHANGED
|
@@ -227,13 +227,7 @@ module ParseAPI
|
|
|
227
227
|
def card(bin, deep: false)
|
|
228
228
|
raise ArgumentError, 'parseapi: Card requires a 2-11 digit prefix string.' unless bin.is_a?(String) && bin.length <= 64 && /\A[0-9]{2,11}\z/.match?(bin.delete(" \t\r\n-"))
|
|
229
229
|
get("/card/#{seg(bin)}", deep: deep)
|
|
230
|
-
end
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
# Parse a phone number and its formats. Pass country for national numbers when needed. Deep
|
|
230
|
+
end # Parse a phone number and its formats. Pass country for national numbers when needed. Deep
|
|
237
231
|
# adds numbering-plan geography on every plan. Carrier, caller, and HLR are separate metered lookups.
|
|
238
232
|
def phone(number, country: nil, deep: false)
|
|
239
233
|
get("/phone/#{seg(number)}", country: country, deep: deep)
|
|
@@ -272,10 +266,6 @@ module ParseAPI
|
|
|
272
266
|
get("/asn/#{seg(asn)}", lang: lang)
|
|
273
267
|
end
|
|
274
268
|
|
|
275
|
-
def mac(mac)
|
|
276
|
-
get("/mac/#{seg(mac)}")
|
|
277
|
-
end
|
|
278
|
-
|
|
279
269
|
# Published DNS records with TTLs. Omit type to check all supported types.
|
|
280
270
|
# Type selects the question, including its CNAME chain. Pooled on every plan.
|
|
281
271
|
def dns(domain, type: nil)
|
|
@@ -311,14 +301,6 @@ module ParseAPI
|
|
|
311
301
|
|
|
312
302
|
|
|
313
303
|
|
|
314
|
-
def currency(code, deep: false, lang: nil)
|
|
315
|
-
get("/currency/#{seg(code)}", deep: deep, lang: lang)
|
|
316
|
-
end
|
|
317
|
-
|
|
318
|
-
def currency_rate(base, quote, date: nil, amount: nil)
|
|
319
|
-
get("/currency/#{seg(base)}/#{seg(quote)}", date: date, amount: amount)
|
|
320
|
-
end
|
|
321
|
-
|
|
322
304
|
def language(code, deep: false, lang: nil)
|
|
323
305
|
get("/language/#{seg(code)}", deep: deep, lang: lang)
|
|
324
306
|
end
|
|
@@ -420,20 +402,6 @@ module ParseAPI
|
|
|
420
402
|
end
|
|
421
403
|
|
|
422
404
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
# Parse or convert a measurement. Amount is a decimal string. Without to, use the
|
|
426
|
-
# type's canonical unit. Locale and system (us or imperial) resolve explicit ambiguity.
|
|
427
|
-
# Successful JSON omits reason and choices. Invalid input adds reason and alternatives add choices.
|
|
428
|
-
def measure(measure, to: nil, locale: nil, system: nil)
|
|
429
|
-
get("/measure/#{seg(measure)}", to: to, locale: locale, system: system)
|
|
430
|
-
end
|
|
431
|
-
|
|
432
|
-
# Discover reviewed units. unit filters compatible conversion targets.
|
|
433
|
-
def measure_units(query: nil, type: nil, unit: nil, lang: nil)
|
|
434
|
-
get('/measure/units', q: query, type: type, unit: unit, lang: lang)
|
|
435
|
-
end
|
|
436
|
-
|
|
437
405
|
private
|
|
438
406
|
|
|
439
407
|
def time_source(timezone, **values)
|
data/lib/parseapi/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: parseapi
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.10.
|
|
4
|
+
version: 1.10.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ParseAPI
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description:
|
|
14
14
|
email:
|