parseapi 1.1.0 → 1.3.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: 61e682a9a5ac02f4539b92a60a198c5df729c3fe1f217b7695c31dc659b2e671
4
+ data.tar.gz: 8e9c4698f7a11569e012738d5b38128c741daf614f64bfd22910559851010822
5
5
  SHA512:
6
- metadata.gz: 3a950380627ddd9a7d98f47fde1405801a404144c75b01c1b3b15c696cb3e57f82dedf330984de6e05aaef646d6c030f1e9b54ec838cf8a053c4b134f6c7cdb2
7
- data.tar.gz: e3f27a65ea6b8aed25a7f6a77d99fee5bef2d682ee883102983a31f1a192181be90d68a4cb4f602f1a3e5a1889ea9c97ac85319f7dfa2f8614297fd11c73b08a
6
+ metadata.gz: f6fb0796e7f85b72285842ac69a8773911f098bf3c340d3ba7606bdb3c8162b54a97ed4533aa6ed595c64dd5486962b8851f60960d4598f2c02e473addf4129e
7
+ data.tar.gz: 28353915115ecfafe4a2128e8fd5c98283c0f28de71f279d60d9b7b2ecebae6dcfc0c7489846decde86461a84037975a1b229520ab2e0c2bf1582fd7ca3af60b
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.3.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
 
@@ -265,3 +265,17 @@ basic = parse.time('America/New_York')
265
265
  detail = parse.time('America/New_York', deep: true)
266
266
  puts basic['at'], detail.dig('deep', 'next_dst')
267
267
  ```
268
+
269
+ ## Stack API
270
+
271
+ ```ruby
272
+ result = parse.stack("example.com")
273
+ ```
274
+
275
+ 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`.
276
+
277
+ `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.
278
+
279
+ 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.
280
+
281
+ 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.3.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.3.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-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: