Repository navigation
client.events: track your users' events, and list them by stream - #62
Merged
Merged
Conversation
…em by stream What is left of #52 that 0.6.5 did not already do. `events.track` posts to /v1/events, with `user=` as in `complete`, and the catalog an `Item` names. `events.list` reads /v1/events/own, now with `stream=`: a publishable key, "api", or an import, which is how an app opened from the portal reads the streams it was opened on. `user_id=` on `complete` and `sections` stays as 0.6.5 shipped it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #52, keeping only what 0.6.5 (#57) did not already ship.
client.events.track(user_id, event, catalog_id=, timestamp=, user=)posts to/v1/eventsand returns the event id.user=is theUserthatcompletetakes. The catalog iscatalog_id=, else the one anItemnames, else the client's default; anOrderover two catalogs is refused. Orders get acart_idandunit_selling_price0 as the API stores them; a naive timestamp is refused.client.events.list(user_id=, limit=, types=, stream=)reads/v1/events/own.stream=is new since Tracked users: client.events.track and .list, user_id= on complete and sections #52 (unbox-apideploy/behaviorgpt), and is how an app opened from the portal reads thestreamsit was opened on.TrackedEventcarriesstream.portal-appskill says how to readstreams.Dropped from #52:
user_id=oncomplete/sectionsand the "user_id or history, not both" rule. 0.6.5 shippeduser_id=adding stored events to the history instead.#52 said to hold the release until events were on for the BehaviorGPT deployment. They are: the portal runs with
EVENTS_ENABLEDagainst it. Checked live, read only:events.list()returns the account's events with their streams, andstream=filters to one.Tests: 14 in
tests/test_events.py; 240 pass; ruff clean.🤖 Generated with Claude Code