MCPcopy Create free account
hub / github.com/anomalyco/opencode-sdk-python / unshare

Method unshare

src/opencode_ai/resources/session.py:444–475  ·  view source on GitHub ↗

Unshare the session Args: extra_headers: Send extra headers extra_query: Add additional query parameters to the request extra_body: Add additional JSON properties to the request timeout: Override the client-level default timeout for this r

(
        self,
        id: str,
        *,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
    )

Source from the content-addressed store, hash-verified

442 )
443
444 def unshare(
445 self,
446 id: str,
447 *,
448 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
449 # The extra values given here take precedence over values defined on the client or passed to this method.
450 extra_headers: Headers | None = None,
451 extra_query: Query | None = None,
452 extra_body: Body | None = None,
453 timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
454 ) -> Session:
455 """
456 Unshare the session
457
458 Args:
459 extra_headers: Send extra headers
460
461 extra_query: Add additional query parameters to the request
462
463 extra_body: Add additional JSON properties to the request
464
465 timeout: Override the client-level default timeout for this request, in seconds
466 """
467 if not id:
468 raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
469 return self._delete(
470 f"/session/{id}/share",
471 options=make_request_options(
472 extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
473 ),
474 cast_to=Session,
475 )
476
477
478class AsyncSessionResource(AsyncAPIResource):

Calls 1

make_request_optionsFunction · 0.85