parseapi 1.8.0 → 1.9.1

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: 1cc18f225a23e41055dcf0d229ad8db68e14226dc6f9fcacf67c61e4d9d93ee5
4
+ data.tar.gz: a7e36c33cc9bdde7cff44a9d83f207486fa5dd1ad9248b671d9084e3b79ccc9f
5
5
  SHA512:
6
- metadata.gz: 9bd2d3e93c4c1f5aa2668146a4af0ad4a18379a483ca77578971980d11dbc64be2942c3a50522723f4ff2492cd23b523fb077769b38c6f4b77aa1f1670a8c71c
7
- data.tar.gz: 1d06c9bf515839953e35f563bc808a177fde1bdac02a4f7a095b90a6d34b2013dfdbec32d4b7b95d0f046cdb514094b7fc370e6c2581bfe1fefe31713be7de1d
6
+ metadata.gz: 412f7871d1f0532c7b305f7b8622caa94e65bfec2a0cb72162ea11e563bd971ab73ca67e7dc2dd87f809b46558ecdd1136fb36d1d7ce9acb929e0672c68b56e7
7
+ data.tar.gz: e10bbf88c255ee45442bd1ebc6f74a61584fd788c6a90fe696efaddd5d608c661bcb9748d5ec634d7941c0ff27e72e6b201f3b89f89c20de4b3b2821629fcf27
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')
@@ -385,3 +419,35 @@ Successful checks may be reused for up to 24 hours. `pretty` optionally formats
385
419
  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.
386
420
 
387
421
  Vehicle lookups use `vin` as the input and response field. Existing VIN methods remain available for compatibility.
422
+
423
+ ## Emoji catalog additions
424
+
425
+ Resolve Unicode emoji or a named shortcode, search or browse a bounded catalog,
426
+ parse emoji positions in text, and convert between Unicode and a selected shortcode source.
427
+ The ordinary lookup remains four fields:
428
+
429
+ ```http
430
+ GET /emoji/rocket
431
+ ```
432
+
433
+ ```json
434
+ {"emoji":"🚀","name":"Rocket","shortcodes":[":rocket:","rocket"],"category":"Travel & Places"}
435
+ ```
436
+
437
+ Use `deep=true` for Unicode facts, keywords, tone families and available artwork.
438
+ Artwork is keyed by style: `deep.artwork.openmoji.svg` is the SVG URL, and
439
+ `deep.artwork.openmoji.png["72"]` is the 72×72 PNG URL (use your language’s map
440
+ access syntax). The same shape applies to `noto` and `twemoji`. Missing styles
441
+ and formats are omitted. URLs pin immutable artwork editions and retain their bytes.
442
+ Core values stay unchanged. Text parsing returns `emojis` with UTF-16 `positions`;
443
+ conversion returns `text` and unresolved tokens with positions and reasons.
444
+
445
+ The compact JSON catalog contains offline identity, qualification-form and
446
+ shortcode indexes. Request `profile=full` when artwork is needed and `lang` when
447
+ localized names and keywords are needed. `/emoji/metadata` carries dataset
448
+ coverage and shared source notices once. Artwork supports Google Noto, Twemoji
449
+ and OpenMoji, with real SVG/PNG availability and immutable first-party URLs.
450
+ A device's emoji font remains the ordinary display.
451
+
452
+ These additions are a local release candidate until the matching SDK and
453
+ backend are published. Existing lookup and search contracts are preserved.
@@ -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.
@@ -377,14 +394,43 @@ module ParseAPI
377
394
  get('/weather', lat: lat, lon: lon, deep: deep, date: date)
378
395
  end
379
396
 
380
- def emoji(emoji, deep: false, lang: nil)
381
- get("/emoji/#{seg(emoji)}", deep: deep, lang: lang)
397
+ def emoji(emoji, deep: false, lang: nil, shortcode_source: nil)
398
+ get("/emoji/#{seg(emoji)}", deep: deep, lang: lang, shortcode_source: shortcode_source)
382
399
  end
383
400
 
384
- def emoji_search(query, limit: nil, deep: false, lang: nil)
385
- get('/emoji', q: query, limit: limit, deep: deep, lang: lang)
401
+ def emoji_search(query, limit: nil, deep: false, lang: nil, category: nil, subcategory: nil, version: nil, max_version: nil, include_skin_tones: nil, offset: nil)
402
+ get('/emoji', q: query, limit: limit, deep: deep, lang: lang, category: category, subcategory: subcategory, version: version, max_version: max_version, include_skin_tones: include_skin_tones.nil? ? nil : include_skin_tones.to_s, offset: offset)
386
403
  end
387
404
 
405
+ def emoji_browse(limit: nil, deep: false, lang: nil, category: nil, subcategory: nil, version: nil, max_version: nil, include_skin_tones: nil, offset: nil)
406
+ get('/emoji', limit: limit, deep: deep, lang: lang, category: category, subcategory: subcategory, version: version, max_version: max_version, include_skin_tones: include_skin_tones.nil? ? nil : include_skin_tones.to_s, offset: offset)
407
+ end
408
+
409
+ # Download the full filtered JSON catalog, including offline resolution maps.
410
+ def emoji_catalog(deep: true, lang: nil, category: nil, subcategory: nil, version: nil, max_version: nil, include_skin_tones: nil, profile: nil)
411
+ get('/emoji/catalog', profile: profile, deep: deep.to_s, lang: lang, category: category, subcategory: subcategory, version: version, max_version: max_version, include_skin_tones: include_skin_tones.nil? ? nil : include_skin_tones.to_s)
412
+ end
413
+
414
+ def emoji_metadata
415
+ get('/emoji/metadata')
416
+ end
417
+
418
+ def emoji_categories
419
+ get('/emoji/categories')
420
+ end
421
+
422
+ # Positions are UTF-16 code units; end is exclusive.
423
+ def emoji_parse(text, deep: false, lang: nil)
424
+ get('/emoji/parse', { deep: deep, lang: lang }, {}, { text: text })
425
+ end
426
+
427
+ def emoji_convert(text, direction:, shortcode_source:)
428
+ get('/emoji/convert', {direction: direction, shortcode_source: shortcode_source}, {}, {text: text})
429
+ end
430
+
431
+
432
+
433
+
388
434
  # Parse or convert a measurement. Amount is a decimal string. Without to, use the
389
435
  # type's canonical unit. Locale and system (us or imperial) resolve explicit ambiguity.
390
436
  def measure(measure, to: nil, locale: nil, system: nil)
@@ -1,3 +1,3 @@
1
1
  module ParseAPI
2
- VERSION = '1.8.0'.freeze
2
+ VERSION = '1.9.1'.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.1
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-10-12 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: