parseapi 1.9.0 → 1.9.2

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: b27f8a145b9ad37ccd82a61e8e175665416036116ed037bb68640d5bd17d3d5c
4
- data.tar.gz: 216cee2f23076dbe2cdcb1339313a157356d63cae236c2204d795fa17242cda7
3
+ metadata.gz: 9305f04eec9c9f1ed484906fb69244df03127edae6b7466c023e5855631ec6dd
4
+ data.tar.gz: 2adccd9a7bfc7a456b7f0b4b5bab86f3d8b30bb4fa744b2c510a14933b99b4bf
5
5
  SHA512:
6
- metadata.gz: 63b2f6b437f1c2e77b8d39a7da11b497a473616f22ac819cc838253495f1ec2b9b146a5f7f6f89025df9a2bc66e18b58a7037b9156bdfc84bc39116280757df2
7
- data.tar.gz: 3fd6e9ef3a55d5c35a7ae693573b17b1fe84aa41936e2836de0def9c1819f0347ee8d49bbff0718d794fc279a26a7b4520d3383805f6e56ca83b6ad806808ec6
6
+ metadata.gz: 4f71799f8c0304a0281fd4b3e50c08d66e4123243515eb85d0077acedbd420bb753ac5a67040e73382005d88cb8f7fd891cc495af7c958c553b8206399e8bf7f
7
+ data.tar.gz: 98f12a7c2d8ef6886cd78587a9a2578c1858aa85bf33e1be6d2ba407d2185f705a0e385b1d6c1da010246b2750c9614850a8f9d7c3a1d580290aa47d8f396a4b
data/README.md CHANGED
@@ -228,6 +228,8 @@ units = parse.measure_units(unit: 'm')
228
228
 
229
229
  `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.
230
230
 
231
+ Successful HTTP JSON contains `measure`, `valid`, `type`, `amount`, and `unit`. Invalid input adds `reason`. `choices` appears only when unit alternatives are available.
232
+
231
233
  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.
232
234
 
233
235
  ## Place statistics and optional detail
@@ -419,3 +421,35 @@ Successful checks may be reused for up to 24 hours. `pretty` optionally formats
419
421
  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.
420
422
 
421
423
  Vehicle lookups use `vin` as the input and response field. Existing VIN methods remain available for compatibility.
424
+
425
+ ## Emoji catalog additions
426
+
427
+ Resolve Unicode emoji or a named shortcode, search or browse a bounded catalog,
428
+ parse emoji positions in text, and convert between Unicode and a selected shortcode source.
429
+ The ordinary lookup remains four fields:
430
+
431
+ ```http
432
+ GET /emoji/rocket
433
+ ```
434
+
435
+ ```json
436
+ {"emoji":"🚀","name":"Rocket","shortcodes":[":rocket:","rocket"],"category":"Travel & Places"}
437
+ ```
438
+
439
+ Use `deep=true` for Unicode facts, keywords, tone families and available artwork.
440
+ Artwork is keyed by style: `deep.artwork.openmoji.svg` is the SVG URL, and
441
+ `deep.artwork.openmoji.png["72"]` is the 72×72 PNG URL (use your language’s map
442
+ access syntax). The same shape applies to `noto` and `twemoji`. Missing styles
443
+ and formats are omitted. URLs pin immutable artwork editions and retain their bytes.
444
+ Core values stay unchanged. Text parsing returns `emojis` with UTF-16 `positions`;
445
+ conversion returns `text` and unresolved tokens with positions and reasons.
446
+
447
+ The compact JSON catalog contains offline identity, qualification-form and
448
+ shortcode indexes. Request `profile=full` when artwork is needed and `lang` when
449
+ localized names and keywords are needed. `/emoji/metadata` carries dataset
450
+ coverage and shared source notices once. Artwork supports Google Noto, Twemoji
451
+ and OpenMoji, with real SVG/PNG availability and immutable first-party URLs.
452
+ A device's emoji font remains the ordinary display.
453
+
454
+ These additions are a local release candidate until the matching SDK and
455
+ backend are published. Existing lookup and search contracts are preserved.
@@ -394,16 +394,46 @@ module ParseAPI
394
394
  get('/weather', lat: lat, lon: lon, deep: deep, date: date)
395
395
  end
396
396
 
397
- def emoji(emoji, deep: false, lang: nil)
398
- 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)
399
399
  end
400
400
 
401
- def emoji_search(query, limit: nil, deep: false, lang: nil)
402
- 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)
403
403
  end
404
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
+
405
434
  # Parse or convert a measurement. Amount is a decimal string. Without to, use the
406
435
  # type's canonical unit. Locale and system (us or imperial) resolve explicit ambiguity.
436
+ # Successful JSON omits reason and choices. Invalid input adds reason and alternatives add choices.
407
437
  def measure(measure, to: nil, locale: nil, system: nil)
408
438
  get("/measure/#{seg(measure)}", to: to, locale: locale, system: system)
409
439
  end
@@ -1,3 +1,3 @@
1
1
  module ParseAPI
2
- VERSION = '1.9.0'.freeze
2
+ VERSION = '1.9.2'.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.9.0
4
+ version: 1.9.2
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-29 00:00:00.000000000 Z
11
+ date: 2026-10-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: