Skip to content

Commit

Permalink
#18 - document breaking change
Browse files Browse the repository at this point in the history
Signed-off-by: Lance Drane <[email protected]>
  • Loading branch information
Lance-Drane committed Nov 8, 2024
1 parent 87a4e06 commit 14ab01b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ _If you are upgrading: please see [`UPGRADING.md`](UPGRADING.md)._
### Changed

- **Breaking:** Services now work with multiple Capabilities instead of a single Capability ([!9](https://github.com/INTERSECT-SDK/python-sdk/pull/9)) .
- **Breaking:** Renamed `IntersectClientMessageParams` to `IntersectDirectMessageParams` ([commit](https://github.com/INTERSECT-SDK/python-sdk/commit/ae0dab312b9ebdb87bc5a9bb62404d9b18953dfe))

### Added

Expand Down
4 changes: 3 additions & 1 deletion UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ Additionally, this reserves the `intersect_sdk_call_service` function - if you a

### Clients

`IntersectClientMessageParams` has been renamed to `IntersectDirectMessageParams` because this object can be used in both Clients and in the new Service-to-Service calls.

When calling another Service's operation, the namespacing has changed from `<function_name>` to `<capability_name>.<function_name>` . So for example, if we were calling `my_endpoint` in the above Service example, the code would change from:

```python
Expand All @@ -166,7 +168,7 @@ params = IntersectClientMessageParams(
to

```python
params = IntersectClientMessageParams(
params = IntersectDirectMessageParams(
operation='MyCapability.my_endpoint',
# ... other parameters unchanged
)
Expand Down
2 changes: 1 addition & 1 deletion src/intersect_sdk/_internal/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def create_external_request(
"""Observed entity (capabilitiy) tells observer (i.e. service) to send an external request.
Params:
- request: the request we want to send out, encapsulated as an IntersectClientMessageParams object
- request: the request we want to send out, encapsulated as an IntersectDirectMessageParams object
- response_handler: optional callback for how we want to handle the response from this request.
- timeout: optional value for how long we should wait on the request, in seconds (default: 300 seconds)
Expand Down
2 changes: 1 addition & 1 deletion src/intersect_sdk/capability/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def intersect_sdk_call_service(
"""Create an external request that we'll send to a different Service.
Params:
- request: the request we want to send out, encapsulated as an IntersectClientMessageParams object
- request: the request we want to send out, encapsulated as an IntersectDirectMessageParams object
- response_handler: optional callback for how we want to handle the response from this request.
- timeout: optional value for how long we should wait on the request, in seconds (default: 300 seconds)
Expand Down
2 changes: 1 addition & 1 deletion src/intersect_sdk/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ def create_external_request(
"""Create an external request that we'll send to a different Service.
Params:
- request: the request we want to send out, encapsulated as an IntersectClientMessageParams object
- request: the request we want to send out, encapsulated as an IntersectDirectMessageParams object
- response_handler: optional callback for how we want to handle the response from this request.
- timeout: optional value for how long we should wait on the request, in seconds (default: 300 seconds)
Expand Down

0 comments on commit 14ab01b

Please sign in to comment.