Repository navigation
sdk-sync: Add CustomerIO.entity(**kwargs) to customerio/track.py. It posts one v2 entity operation (type, action, identi - #138
Closed
sydneycollins-cio wants to merge 1 commit into
Closed
sydneycollins-cio wants to merge 1 commit into
sydneycollins-cio wants to merge 1 commit into
Conversation
…nds the keyword arguments as one operation to `/api/v2/entity` using a POST request, and it builds the URL the same way `batch()` does, including the host and port handling. If you call it with no arguments, it raises `CustomerIOException`, just as the node `entity()` rejects an empty operation. I added two tests, `test_entity_call` and `test_entity_empty_raises`, written like the existing batch test. All 62 tests pass.
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.
Add
CustomerIO.entity()forPOST /api/v2/entityEdge (customerio/edge@af983b4) serves the public
POST /api/v2/entityroute ("Make a single request"). customerio-node wraps it asTrackClient.entity(), but customerio-python had no equivalent.Changes
customerio/track.py: newentity(**kwargs)method. It posts one v2 operation (type, action, identifiers, attributes, ...) to/api/v2/entity. It builds the URL the same waybatch()does, including host and port. It raisesCustomerIOExceptionwhen called with no arguments.Probe result
entity_identify at edge af983b44: HTTP 200 (proven)
Test output (tail)
Reference SDK customerio-node at 7897f4c1d7194752d20721a43eef89f3349f65c2
Label:
sdk-sync