symphony.bdk.core.service.signal.signal_service.OboSignalService#

class symphony.bdk.core.service.signal.signal_service.OboSignalService(signals_api: symphony.bdk.gen.agent_api.signals_api.SignalsApi, auth_session: symphony.bdk.core.auth.auth_session.AuthSession, retry_config: symphony.bdk.core.config.model.bdk_retry_config.BdkRetryConfig)#

Bases: object

Service class exposing OBO-enabled endpoints to manage signal information.

This service is used for listing signals related to the OBO user, get information of a specified signal or perform some actions related to the signal like:

  • List signals

  • Get a signal

  • Create a signal

  • Update a signal

  • Delete a signal

  • Subscribe or unsubscribe a signal

__init__(signals_api: symphony.bdk.gen.agent_api.signals_api.SignalsApi, auth_session: symphony.bdk.core.auth.auth_session.AuthSession, retry_config: symphony.bdk.core.config.model.bdk_retry_config.BdkRetryConfig)#

Methods

__init__(signals_api, auth_session, retry_config)

create_signal(signal)

Creates a new Signal.

delete_signal(signal_id)

Deletes an existing Signal.

get_signal(signal_id)

Gets details about the specified signal.

list_all_signals([chunk_size, max_number])

Lists all signals on behalf of the user.

list_all_subscribers(signal_id[, ...])

Gets all the subscribers for the specified signal.

list_signals([skip, limit])

Lists signals on behalf of the user.

list_subscribers(signal_id[, skip, limit])

Gets the subscribers for the specified signal.

subscribe_users_to_signal(signal_id, pushed, ...)

Subscribe an array of users to a Signal.

unsubscribe_users_to_signal(signal_id, user_ids)

Unsubscribes an array of users from the specified Signal.

update_signal(signal_id, signal)

Updates an existing Signal.

create_signal(signal: symphony.bdk.gen.agent_model.base_signal.BaseSignal) symphony.bdk.gen.agent_model.signal.Signal#

Creates a new Signal.

See: ‘Create signal <https://developers.symphony.com/restapi/reference/create-signal>’_

Parameters

signal – The new Signal object to be created.

Returns

The signal created.

delete_signal(signal_id: str) None#

Deletes an existing Signal.

See: ‘Delete signal <https://developers.symphony.com/restapi/reference/delete-signal>’_

Parameters

signal_id – The Id of the existing signal to be deleted.

get_signal(signal_id: str) symphony.bdk.gen.agent_model.signal.Signal#

Gets details about the specified signal.

See: ‘Get signal <https://developers.symphony.com/restapi/reference/get-signal>’_

Parameters

signal_id – Id of the signal to display.

Returns

The signal found.

async list_all_signals(chunk_size: int = 50, max_number: Optional[int] = None) AsyncGenerator[symphony.bdk.gen.agent_model.signal.Signal, None]#

Lists all signals on behalf of the user. The response includes signals that the user has created and public signals to which they have subscribed.

See: ‘List signals <https://developers.symphony.com/restapi/reference/list-signals>’_

Parameters
  • chunk_size – the maximum number of elements to retrieve in one underlying HTTP call

  • max_number – the total maximum number of elements to retrieve

Returns

an asynchronous generator of found signals

async list_all_subscribers(signal_id: str, chunk_size: int = 50, max_number: Optional[int] = None) AsyncGenerator[symphony.bdk.gen.agent_model.channel_subscriber.ChannelSubscriber, None]#

Gets all the subscribers for the specified signal.

See: ‘Subscribers <https://developers.symphony.com/restapi/reference/subscribers>’_

Parameters
  • signal_id – the Id of the signal.

  • chunk_size – the maximum number of elements to retrieve in one underlying HTTP call.

  • max_number – the total maximum number of elements to retrieve.

Returns

an asynchronous generator returning all users subscribed to the signal.

list_signals(skip: int = 0, limit: int = 50) symphony.bdk.gen.agent_model.signal_list.SignalList#

Lists signals on behalf of the user. The response includes signals that the user has created and public signals to which they have subscribed.

See: ‘List signals <https://developers.symphony.com/restapi/reference/list-signals>’_

Parameters
  • skip – The number of signals to skip.

  • limit – Maximum number of signals to return. Default is 50, maximum value is 500.

Returns

List of signals found.

list_subscribers(signal_id: str, skip: int = 0, limit: int = 50) symphony.bdk.gen.agent_model.channel_subscriber_response.ChannelSubscriberResponse#

Gets the subscribers for the specified signal.

See: ‘Subscribers <https://developers.symphony.com/restapi/reference/subscribers>’_

Parameters
  • signal_id – The Id of the signal.

  • skip – The number of results to skip.

  • limit – The maximum number of subscribers to return. The maximum value accepted for this parameter is 100 and the default value is 50.

Returns

The list of users subscribed to the signal.

subscribe_users_to_signal(signal_id: str, pushed: bool, user_ids: [<class 'int'>]) symphony.bdk.gen.agent_model.channel_subscription_response.ChannelSubscriptionResponse#

Subscribe an array of users to a Signal.

See: ‘Subscribe signal <https://developers.symphony.com/restapi/reference/subscribe-signal>’_

Parameters
  • signal_id – The Id of the signal to be subscribed.

  • pushed – Prevents the user from unsubscribing from the Signal

  • user_ids – An array of User Ids to subscribe to the Signal

Returns

Result of the bulk subscriptions

unsubscribe_users_to_signal(signal_id: str, user_ids: [<class 'int'>]) symphony.bdk.gen.agent_model.channel_subscription_response.ChannelSubscriptionResponse#

Unsubscribes an array of users from the specified Signal.

See: ‘Unsubscribe signal <https://developers.symphony.com/restapi/reference/unsubscribe-signal>’_

Parameters
  • signal_id – The Id of the signal to be subscribed.

  • user_ids – An array of User Ids to subscribe to the Signal

Returns

Result of the bulk unsubscriptions

update_signal(signal_id: str, signal: symphony.bdk.gen.agent_model.base_signal.BaseSignal) symphony.bdk.gen.agent_model.signal.Signal#

Updates an existing Signal.

See: ‘Update signal <https://developers.symphony.com/restapi/reference/update-signal>’_

Parameters
  • signal_id – The Id of the signal to be modified.

  • signal – The Signal object to be updated.

Returns

The updated signal.