recapi 0.1.18 → 0.1.19

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -1
  3. data/lib/recapi.rb +2 -2
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 530b2c52be5b0482d1fb31197244cca58710fabc6f885071bd144c8ba62a94bc
4
- data.tar.gz: 0ceba9e4fbd15106b7cbc1fb19816499eec84c9ec2f2d0ff84c587a934c24288
3
+ metadata.gz: 3d35f47328f77966c86c8e878287daf33ec8d124022a53886261026d59dcb1f5
4
+ data.tar.gz: 71ba6c97a3725dc7d713f6f7ce18c4192af93b64e1e2a0fe3c796effc7074f16
5
5
  SHA512:
6
- metadata.gz: ed858a1504228adf2a0523832cf85758a256e357575f78baeedf4755cfc3abef620f71c15efd3aa6b034475cc5ff54c87097ce416f06ada884e33e4b279cf948
7
- data.tar.gz: ea85315a27410bf52646c16f57f600edc33b9851b461ae73e18bc8fdf87d7ee0f8e7a9fe49b2a6f528098b1170f9009dce9392b8871fcc39d39fb01d94248963
6
+ metadata.gz: 4cfa62dbe9f9406553978b4bb365344230b1bb96e125487aff7e651fc922cf3dc47994acb7bb464b3f7af8168e6469f51cfff37c85f646d1fd159c45919f1ba9
7
+ data.tar.gz: a14ead0cea8e039816d866bdd6522a75bfb8ceffdb51c07a6b72a86ec0ac4a762b909c0e12130e29a0936bf61ef195dcfbdd95e2d5a3d5b624316bfda4ae10a5
data/README.md CHANGED
@@ -28,7 +28,7 @@ line with your address): save it as `lib/recapi.rb` and
28
28
  `require Rails.root.join("lib/recapi").to_s` instead.
29
29
 
30
30
  ```sh
31
- curl -fLo lib/recapi.rb https://api.<your-domain>/sdk/ruby/recapi-0.1.18.rb
31
+ curl -fLo lib/recapi.rb https://api.<your-domain>/sdk/ruby/recapi-0.1.19.rb
32
32
  ```
33
33
 
34
34
  ## Quick start
@@ -138,6 +138,8 @@ so a visitor who never returns stays on disk (about 8 KB each): run
138
138
 
139
139
  ## Changes
140
140
 
141
+ - 2026-11-23: version 0.1.19. The comment on `Item#why` names the reason code
142
+ `viewed_earlier`, a product the visitor opened earlier.
141
143
  - 2026-11-22: version 0.1.18. The saved history keeps, per product, the strongest
142
144
  level reached (opened, in the cart, bought), and sends it with each list. Lists
143
145
  don't use it yet; a history saved by an older version still loads.
data/lib/recapi.rb CHANGED
@@ -25,7 +25,7 @@ rescue LoadError
25
25
  end
26
26
 
27
27
  module Recapi
28
- VERSION = "0.1.18"
28
+ VERSION = "0.1.19"
29
29
 
30
30
  # Decayed user history, exactly as docs/history-spec.md (times in unix ms).
31
31
  # A port of sdk/python's history.py, snapshot merging included.
@@ -366,7 +366,7 @@ module Recapi
366
366
  #
367
367
  # why is the reason code to turn into a label for visitors: "for_you",
368
368
  # "similar", "next", "bought_together", "trending", "popular", "new",
369
- # "explore" or "more" (docs/api.md "Reason codes"), nil when the API sent
369
+ # "explore", "more" or "viewed_earlier" (docs/api.md "Reason codes"), nil when the API sent
370
370
  # none. New codes may be added: show nothing for an unknown one.
371
371
  Item = Struct.new(:item_id, :score, :slot, :metadata, :why, keyword_init: true)
372
372
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.18
4
+ version: 0.1.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - recapi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-11-22 00:00:00.000000000 Z
11
+ date: 2026-11-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'Ruby client for the recapi recommendation API: per-user history, event
14
14
  batching, retries, popular fallback. Standard library only.'