parseapi 1.1.0 → 1.4.0

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: eea5dc559df5f4a2007ef9aedf6a4347ca9090258401a3ffc1e55111dce93dbd
4
- data.tar.gz: 9c4594ac80967acf22f4e1d8f7b98072eee25e9729f2979632cc2307eeed755a
3
+ metadata.gz: 4ff073cfaba8eb3f7afa9550ddc3e69aa9ac77c48ebc082393489eedc465139a
4
+ data.tar.gz: e09d1d59dde43a30422d4e2b5f1ce011fa30952bddbe570c95acc07b26ce366e
5
5
  SHA512:
6
- metadata.gz: 3a950380627ddd9a7d98f47fde1405801a404144c75b01c1b3b15c696cb3e57f82dedf330984de6e05aaef646d6c030f1e9b54ec838cf8a053c4b134f6c7cdb2
7
- data.tar.gz: e3f27a65ea6b8aed25a7f6a77d99fee5bef2d682ee883102983a31f1a192181be90d68a4cb4f602f1a3e5a1889ea9c97ac85319f7dfa2f8614297fd11c73b08a
6
+ metadata.gz: d36e99b464e96c9b6b9a33038f5aafad856606be7a394ee7d6df0b66afd1aa584ee0b7a45e116deb9fb281a3198fa063e1f652242ef6987cc353b427c00df9d5
7
+ data.tar.gz: 1e894cfdf2410f80eca23d6b7dae2b4652cf417a32737ea907ca9bd5243192b98f11ebb230aa10f448bce90b8eac6160fbbc13536fb571c4e04f3b7df78d105b
data/README.md CHANGED
@@ -13,7 +13,7 @@ Get a key at [parseapi.com](https://parseapi.com). The client also reads `PARSEA
13
13
 
14
14
  ## API versions
15
15
 
16
- Version 1.1.0 explicitly selects the API contract supported by this SDK. It sends `Parse-Version: 2.0.0` on every lookup so responses match the API contract supported by the package. Your key and the team's saved default stay the same.
16
+ Version 1.4.0 explicitly selects the API contract supported by this SDK. It sends `Parse-Version: 2.0.0` on every lookup so responses match the API contract supported by the package. Your key and the team's saved default stay the same.
17
17
 
18
18
  Upgrade the dependency in staging, review the [release notes](https://parseapi.com/docs/releases), and test the application before deploying the same code and dependency version to production. Commit your dependency lockfile so the tested package travels with your deployment. Future major SDK upgrades can select a newer API contract.
19
19
 
@@ -153,6 +153,8 @@ Unit discovery accepts optional `query`, `type`, and `unit` filters. `unit` sele
153
153
 
154
154
  ## Place statistics and optional detail
155
155
 
156
+ 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).
157
+
156
158
  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.
157
159
 
158
160
  ```ruby
@@ -265,3 +267,17 @@ basic = parse.time('America/New_York')
265
267
  detail = parse.time('America/New_York', deep: true)
266
268
  puts basic['at'], detail.dig('deep', 'next_dst')
267
269
  ```
270
+
271
+ ## Stack API
272
+
273
+ ```ruby
274
+ result = parse.stack("example.com")
275
+ ```
276
+
277
+ Pass a public hostname without a scheme, path, port or IP address. Stack returns the checked URL and `checked_at` time, followed by `scope`, `pages` and `partial`. `scope` is `homepage` or `site`; `pages` counts successfully checked HTML pages. `partial` is true for homepage-only or incomplete bounded site checks. False means the known in-scope candidates were completed, not that every page on a website was visited. A homepage result has `scope: "homepage"`, `pages: 1` and `partial: true`.
278
+
279
+ `cms`, `servers`, `frameworks`, `ecommerce`, `analytics`, `chat`, `payments` and `hosting` are arrays because a site can use several technologies in each category. Each entry contains `technology`, `name` and nullable `version`. Technology codes are open strings. A successful check uses empty arrays for categories with no matches. When no HTML page could be checked, `checked_at` and all categories are null, `pages` is 0 and `partial` is null. Unknown or conflicting versions are null. Missing detections do not prove absence.
280
+
281
+ Successful checks may be reused for up to 24 hours. `pretty` optionally formats the wire JSON. Stack uses your plan's request allowance and API version 2.0.0 selected by this client.
282
+
283
+ Stack defaults to a 35-second transport timeout so a first scan has time to finish. Other lookups retain their 10-second default. An explicit client timeout takes precedence.
@@ -38,6 +38,7 @@ module ParseAPI
38
38
 
39
39
  @base_url = URI((base_url || ENV['PARSEAPI_BASE_URL'] || DEFAULT_BASE_URL).sub(%r{/+\z}, ''))
40
40
  @timeout = timeout || DEFAULT_TIMEOUT
41
+ @timeout_explicit = !timeout.nil?
41
42
  @retries = retries
42
43
  raise ArgumentError, 'parseapi: timeout must be a finite positive number.' unless @timeout.is_a?(Numeric) && @timeout.finite? && @timeout > 0
43
44
  raise ArgumentError, 'parseapi: retries must be a non-negative integer or nil.' unless @retries.nil? || (@retries.is_a?(Integer) && @retries >= 0)
@@ -205,6 +206,13 @@ module ParseAPI
205
206
  get("/hlr/#{seg(number)}", country: country, deep: deep)
206
207
  end
207
208
 
209
+ # Identify website technologies and versions by category.
210
+ # All categories are lists. Scope, pages and partial describe bounded coverage.
211
+ # Lists are nil when no page could be checked and empty for no matches.
212
+ def stack(domain, deep: false, pretty: false)
213
+ get("/stack/#{seg(domain)}", deep: deep, pretty: pretty)
214
+ end
215
+
208
216
  # Check whether a domain is registered. Deep adds registration dates, registrar, status and DNSSEC on paid plans.
209
217
  def domain(domain, deep: false)
210
218
  get("/domain/#{seg(domain)}", deep: deep)
@@ -390,7 +398,8 @@ module ParseAPI
390
398
  def execute(uri, headers)
391
399
  return @transport.call(uri.to_s, headers) if @transport
392
400
 
393
- http = connection
401
+ timeout = !@timeout_explicit && uri.path.start_with?('/stack/') ? 35 : @timeout
402
+ http = connection(timeout)
394
403
  request = Net::HTTP::Get.new(uri.request_uri)
395
404
  headers.each { |name, value| request[name] = value }
396
405
  response = http.request(request)
@@ -399,17 +408,17 @@ module ParseAPI
399
408
  [response.code.to_i, header_hash, response.body || '']
400
409
  end
401
410
 
402
- def connection
411
+ def connection(timeout = @timeout)
403
412
  if @http.nil?
404
413
  @http = Net::HTTP.new(@base_url.host, @base_url.port)
405
414
  @http.use_ssl = @base_url.scheme == 'https'
406
- @http.open_timeout = @timeout
407
- @http.read_timeout = @timeout
408
- @http.write_timeout = @timeout
409
415
  # The client owns retries, including retries: 0.
410
416
  @http.max_retries = 0
411
417
  @http.keep_alive_timeout = 30
412
418
  end
419
+ @http.open_timeout = timeout
420
+ @http.read_timeout = timeout
421
+ @http.write_timeout = timeout
413
422
  @http.start unless @http.started?
414
423
  @http
415
424
  end
@@ -1,3 +1,3 @@
1
1
  module ParseAPI
2
- VERSION = '1.1.0'.freeze
2
+ VERSION = '1.4.0'.freeze
3
3
  end
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.1.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ParseAPI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-09-20 00:00:00.000000000 Z
11
+ date: 2026-09-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: