parseapi 1.8.0 → 1.9.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: 3bd44c95f15db2d0248e3b9afebf94580ef381cd5df317b668d92bd6ba8e5f3a
4
- data.tar.gz: 51258c88b79a3c61ce685fbc5c4fa4606adc86ee1a64a22574f9cd41a690b418
3
+ metadata.gz: b27f8a145b9ad37ccd82a61e8e175665416036116ed037bb68640d5bd17d3d5c
4
+ data.tar.gz: 216cee2f23076dbe2cdcb1339313a157356d63cae236c2204d795fa17242cda7
5
5
  SHA512:
6
- metadata.gz: 9bd2d3e93c4c1f5aa2668146a4af0ad4a18379a483ca77578971980d11dbc64be2942c3a50522723f4ff2492cd23b523fb077769b38c6f4b77aa1f1670a8c71c
7
- data.tar.gz: 1d06c9bf515839953e35f563bc808a177fde1bdac02a4f7a095b90a6d34b2013dfdbec32d4b7b95d0f046cdb514094b7fc370e6c2581bfe1fefe31713be7de1d
6
+ metadata.gz: 63b2f6b437f1c2e77b8d39a7da11b497a473616f22ac819cc838253495f1ec2b9b146a5f7f6f89025df9a2bc66e18b58a7037b9156bdfc84bc39116280757df2
7
+ data.tar.gz: 3fd6e9ef3a55d5c35a7ae693573b17b1fe84aa41936e2836de0def9c1819f0347ee8d49bbff0718d794fc279a26a7b4520d3383805f6e56ca83b6ad806808ec6
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.7.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
+ This SDK 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
 
@@ -44,6 +44,35 @@ Results are plain data. Pass a returned code or coordinate to another operation
44
44
 
45
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. Country `deep.tax_id_format` and `deep.tax_id_regex` describe registration-number format only. Use `vat` for a metered registration check with `deep` explicitly enabled.
46
46
 
47
+ ## Company directory
48
+
49
+ Find candidates, then fetch the profile you selected.
50
+
51
+ ```ruby
52
+ candidates = parse.company_search(query: 'GitLab', country: 'US', limit: 5)
53
+ selected_id = 'co_caczn6wf36hj' # Explicitly chosen after reviewing candidates.
54
+ profile = parse.company_id(selected_id, deep: true)
55
+ unless candidates['next'].nil?
56
+ next_page = parse.company_search(
57
+ query: 'GitLab', country: 'US', limit: 5, cursor: candidates['next']
58
+ )
59
+ end
60
+ coverage = parse.company_coverage
61
+ ```
62
+
63
+ Use at most one selector: `query` for a name, `domain`, `ticker`, or `identifier`; country or exact industry filters also allow discovery without a selector. The API validates selectors and filters. Use `country` to scope candidates, `exchange` with a ticker, and `authority` with an identifier. Search returns `companies` and an opaque `next` cursor. Review candidate identity and match details before choosing a stable Company ID. Pass `next` as `cursor` with the same selector, filters and limit to continue that result set.
64
+
65
+ Directory profiles are plain JSON data. `deep` belongs to each company in search results and adds legal/reference detail plus nullable `description`, `logo`, `founded`, and the `social_profiles`, `phone_numbers`, `email_addresses`, `domains` and `sources` collections. A logo is a reported URL. `founded` has `value` and `precision`, distinct from incorporation. Sources identify the website, filing or business register, supported fields and observation/update timestamps. Employee observations retain count, measurement date, organization scope and approximation; null means unknown. Missing, null, empty and unknown fields retain their response values. An empty search is a successful result. Invalid inputs and unknown IDs raise the existing API error.
66
+
67
+ Company directory social profiles contain `platform`, `url` and `handle`; unknown metadata stays null. Phone and email records use `type` for the source-reported purpose. Earlier response fields remain readable by the client.
68
+
69
+ The recipe requests one candidate page, one explicitly chosen profile and directory coverage, plus a second page when a cursor is returned. Each operation uses the existing retry settings. The number-validation call remains unchanged. `lang` applies to national company-number lookup, while directory calls use the source labels.
70
+
71
+ Discovery example: `parse.company_search(country: 'US', industry: '0700', industry_type: 'sic')`
72
+
73
+ Supply `industry` and `industry_type` together. The supported namespace is `sic`, with an exact four-digit string such as `0700`; leading zeros are meaningful. Country-only discovery is also supported. Filters intersect and may narrow an existing selector. Country matches the profile country, not a headquarters or operating-presence claim. Unknown values do not match a requested filter. Filter-only candidates use `match.field: "filters"` and `match.value: null`; reuse the same filters and limit with a returned cursor. Counts describe this directory edition, not complete country coverage.
74
+
75
+
47
76
  ## Calls
48
77
 
49
78
  One method per endpoint, named after the route.
@@ -67,6 +96,11 @@ parse.postal_distance('28202', '10001', country: 'US')
67
96
  parse.address('1600 Pennsylvania Ave NW, Washington, DC 20500', country: 'US')
68
97
  parse.address_search('123 main', country: 'US', postal: '27401')
69
98
  parse.company('732829320', country: 'FR')
99
+ parse.company_id('co_caczn6wf36hj', deep: true)
100
+ parse.company_search(domain: 'about.gitlab.com')
101
+ parse.company_search(ticker: 'GTLB', exchange: 'Nasdaq')
102
+ parse.company_search(identifier: '0001653482', authority: 'sec')
103
+ parse.company_coverage
70
104
  parse.city('charlotte', country: 'US')
71
105
  parse.city_id('city_mb8mbqrkz8zb')
72
106
  parse.city_search('char', country: 'US', limit: 10)
@@ -134,7 +168,7 @@ Choose display names for one request:
134
168
  parse.country('DE', lang: 'fr')
135
169
  ```
136
170
 
137
- `lang` is optional on geography lookups and their lists/searches, Currency lookup, Language, Date, Time/Timezone, Emoji lookup/search, and unit discovery. IP, ASN, Company and NPI 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.
171
+ `lang` is optional on geography lookups and their lists/searches, Currency lookup, Language, Date, Time/Timezone, Emoji lookup/search, and unit discovery. IP, ASN, national Company number lookup and NPI 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.
138
172
 
139
173
  The next call keeps its usual default unless it also supplies `lang`. Existing `deep` rules still apply. Date `format` and measurement `locale` remain explicit input-parsing controls.
140
174
 
@@ -362,7 +396,7 @@ before dispatch, accepted input is forwarded unchanged. Never send a full card n
362
396
 
363
397
  ## Optional detail
364
398
 
365
- The default response answers the common task. Ask for `deep` when you need more detail about that same result. Core fields stay equal. City, Industry and Emoji searches put detail inside each result. Postal nearby and distance put metropolitan detail beside the entity it describes. Time conversion keeps target detail in `to.deep`; only the source has `deep.next_dst`.
399
+ The default response answers the common task. Ask for `deep` when you need more detail about that same result. Core fields stay equal. City, Company directory, Industry and Emoji searches put detail inside each result. Postal nearby and distance put metropolitan detail beside the entity it describes. Time conversion keeps target detail in `to.deep` or each `targets` item; only the source has `deep.next_dst`.
366
400
 
367
401
  ```ruby
368
402
  basic = parse.time('America/New_York')
@@ -156,6 +156,23 @@ module ParseAPI
156
156
  get("/company/#{seg(number)}", country: country, deep: deep, lang: lang)
157
157
  end
158
158
 
159
+ # Fetch a directory profile by its stable Company ID.
160
+ def company_id(id, deep: false)
161
+ get("/company/id/#{seg(id)}", deep: deep)
162
+ end
163
+
164
+ # Use at most one selector, or discover by country, industry or selected registration. The API
165
+ # validates filters; pair the four-digit industry string with industry_type: "sic". Pass a
166
+ # returned cursor with the same selector and filters. Deep belongs to each result.
167
+ def company_search(query: nil, domain: nil, ticker: nil, identifier: nil, country: nil, exchange: nil, authority: nil, limit: nil, cursor: nil, deep: false, industry: nil, industry_type: nil)
168
+ get('/company', q: query, domain: domain, ticker: ticker, identifier: identifier, country: country, exchange: exchange, authority: authority, limit: limit, cursor: cursor, deep: deep, industry: industry, industry_type: industry_type)
169
+ end
170
+
171
+ # Read the directory edition and source coverage.
172
+ def company_coverage
173
+ get('/company/directory/coverage')
174
+ end
175
+
159
176
  # Parse an email and check its format and domain. Deep explicitly requests a metered
160
177
  # deliverability check. Deep checks use one attempt by default. An explicit retry count can
161
178
  # repeat paid usage.
@@ -1,3 +1,3 @@
1
1
  module ParseAPI
2
- VERSION = '1.8.0'.freeze
2
+ VERSION = '1.9.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.8.0
4
+ version: 1.9.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-25 00:00:00.000000000 Z
11
+ date: 2026-09-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: