@@ -87,11 +87,9 @@ def __init__(
87
87
"""
88
88
Contains the settings used to initialize a :class:`BotFrameworkAdapter` instance.
89
89
90
- :param app_id: The bot application ID. This is the appId returned by the Azure portal registration, and is
91
- the value of the `MicrosoftAppId` parameter in the `config.py` file.
90
+ :param app_id: The bot application ID.
92
91
:type app_id: str
93
- :param app_password: The bot application password. This is the password returned by the Azure portal
94
- registration, and is
92
+ :param app_password: The bot application password.
95
93
the value os the `MicrosoftAppPassword` parameter in the `config.py` file.
96
94
:type app_password: str
97
95
:param channel_auth_tenant: The channel tenant to use in conversation
@@ -201,7 +199,7 @@ async def continue_conversation(
201
199
202
200
:return: A task that represents the work queued to execute.
203
201
204
- .. note ::
202
+ .. remarks ::
205
203
This is often referred to as the bots *proactive messaging* flow as it lets the bot proactively
206
204
send messages to a conversation or user that are already in a communication.
207
205
Scenarios such as sending notifications or coupons to a user are enabled by this function.
@@ -247,7 +245,7 @@ async def create_conversation(
247
245
248
246
:return: A task representing the work queued to execute.
249
247
250
- .. note ::
248
+ .. remarks ::
251
249
To start a conversation, your bot must know its account information and the user's
252
250
account information on that channel.
253
251
Most channels only support initiating a direct message (non-group) conversation.
@@ -306,9 +304,7 @@ async def create_conversation(
306
304
307
305
async def process_activity (self , req , auth_header : str , logic : Callable ):
308
306
"""
309
- Creates a turn context and runs the middleware pipeline for an incoming activity,
310
- Processes an activity received by the bots web server. This includes any messages sent from a
311
- user and is the method that drives what's often referred to as the bots *reactive messaging* flow.
307
+ Creates a turn context and runs the middleware pipeline for an incoming activity.
312
308
313
309
:param req: The incoming activity
314
310
:type req: :class:`typing.str`
@@ -317,15 +313,15 @@ async def process_activity(self, req, auth_header: str, logic: Callable):
317
313
:param logic: The logic to execute at the end of the adapter's middleware pipeline.
318
314
:type logic: :class:`typing.Callable`
319
315
320
- :return: A task that represents the work queued to execute. If the activity type
321
- was `Invoke` and the corresponding key (`channelId` + `activityId`) was found then
322
- an :class:`InvokeResponse` is returned; otherwise, `null` is returned.
316
+ :return: A task that represents the work queued to execute.
323
317
324
- .. note::
318
+ .. remarks::
319
+ This class processes an activity received by the bots web server. This includes any messages
320
+ sent from a user and is the method that drives what's often referred to as the
321
+ bots *reactive messaging* flow.
325
322
Call this method to reactively send a message to a conversation.
326
323
If the task completes successfully, then an :class:`InvokeResponse` is returned;
327
324
otherwise. `null` is returned.
328
-
329
325
"""
330
326
activity = await self .parse_request (req )
331
327
auth_header = auth_header or ""
@@ -457,7 +453,7 @@ async def update_activity(self, context: TurnContext, activity: Activity):
457
453
458
454
:return: A task that represents the work queued to execute
459
455
460
- .. note ::
456
+ .. remarks ::
461
457
If the activity is successfully sent, the task result contains
462
458
a :class:`botbuilder.schema.ResourceResponse` object containing the ID that
463
459
the receiving channel assigned to the activity.
@@ -490,6 +486,7 @@ async def delete_activity(
490
486
:return: A task that represents the work queued to execute
491
487
492
488
.. note::
489
+
493
490
The activity_id of the :class:`botbuilder.schema.ConversationReference` identifies the activity to delete.
494
491
"""
495
492
try :
@@ -565,7 +562,7 @@ async def delete_conversation_member(
565
562
Deletes a member from the current conversation.
566
563
567
564
:param context: The context object for the turn
568
- :type context: :class:`TurnContext`
565
+ :type context: :class:`botbuilder.core. TurnContext`
569
566
:param member_id: The ID of the member to remove from the conversation
570
567
:type member_id: str
571
568
@@ -603,7 +600,7 @@ async def get_activity_members(self, context: TurnContext, activity_id: str):
603
600
Lists the members of a given activity.
604
601
605
602
:param context: The context object for the turn
606
- :type context: :class:`TurnContext`
603
+ :type context: :class:`botbuilder.core. TurnContext`
607
604
:param activity_id: (Optional) Activity ID to enumerate.
608
605
If not specified the current activities ID will be used.
609
606
@@ -645,7 +642,7 @@ async def get_conversation_members(self, context: TurnContext):
645
642
Lists the members of a current conversation.
646
643
647
644
:param context: The context object for the turn
648
- :type context: :class:`TurnContext`
645
+ :type context: :class:`botbuilder.core. TurnContext`
649
646
650
647
:raises: An exception error
651
648
@@ -674,9 +671,7 @@ async def get_conversation_members(self, context: TurnContext):
674
671
675
672
async def get_conversations (self , service_url : str , continuation_token : str = None ):
676
673
"""
677
- Lists the Conversations in which this bot has participated for a given channel server. The channel server
678
- returns results in pages and each page will include a `continuationToken` that can be used to fetch the next
679
- page of results from the server.
674
+ Lists the Conversations in which this bot has participated for a given channel server.
680
675
681
676
:param service_url: The URL of the channel server to query. This can be retrieved from
682
677
`context.activity.serviceUrl`
@@ -689,8 +684,10 @@ async def get_conversations(self, service_url: str, continuation_token: str = No
689
684
690
685
:return: A task that represents the work queued to execute
691
686
692
- .. note:: If the task completes successfully, the result contains a page of the members of the current
693
- conversation.
687
+ .. remarks::
688
+ The channel server returns results in pages and each page will include a `continuationToken` that
689
+ can be used to fetch the next page of results from the server.
690
+ If the task completes successfully, the result contains a page of the members of the current conversation.
694
691
This overload may be called from outside the context of a conversation, as only the bot's service URL and
695
692
credentials are required.
696
693
"""
@@ -705,7 +702,7 @@ async def get_user_token(
705
702
Attempts to retrieve the token for a user that's in a login flow.
706
703
707
704
:param context: Context for the current turn of conversation with the user
708
- :type context: :class:`TurnContext`
705
+ :type context: :class:`botbuilder.core. TurnContext`
709
706
:param connection_name: Name of the auth connection to use
710
707
:type connection_name: str
711
708
:param magic_code" (Optional) user entered code to validate
@@ -752,7 +749,7 @@ async def sign_out_user(
752
749
Signs the user out with the token server.
753
750
754
751
:param context: Context for the current turn of conversation with the user
755
- :type context: :class:`TurnContext`
752
+ :type context: :class:`botbuilder.core. TurnContext`
756
753
:param connection_name: Name of the auth connection to use
757
754
:type connection_name: str
758
755
:param user_id: User id of user to sign out
@@ -781,13 +778,14 @@ async def get_oauth_sign_in_link(
781
778
Gets the raw sign-in link to be sent to the user for sign-in for a connection name.
782
779
783
780
:param context: Context for the current turn of conversation with the user
784
- :type context: :class:`TurnContext`
781
+ :type context: :class:`botbuilder.core. TurnContext`
785
782
:param connection_name: Name of the auth connection to use
786
783
:type connection_name: str
787
784
788
785
:returns: A task that represents the work queued to execute
789
786
790
787
.. note::
788
+
791
789
If the task completes successfully, the result contains the raw sign-in link
792
790
"""
793
791
self .check_emulating_oauth_cards (context )
@@ -814,7 +812,7 @@ async def get_token_status(
814
812
Retrieves the token status for each configured connection for the given user.
815
813
816
814
:param context: Context for the current turn of conversation with the user
817
- :type context: :class:`TurnContext`
815
+ :type context: :class:`botbuilder.core. TurnContext`
818
816
:param user_id: The user Id for which token status is retrieved
819
817
:type user_id: str
820
818
:param include_filter: (Optional) Comma separated list of connection's to include.
@@ -848,14 +846,11 @@ async def get_aad_tokens(
848
846
Retrieves Azure Active Directory tokens for particular resources on a configured connection.
849
847
850
848
:param context: Context for the current turn of conversation with the user
851
- :type context: :class:`TurnContext`
852
-
849
+ :type context: :class:`botbuilder.core.TurnContext`
853
850
:param connection_name: The name of the Azure Active Directory connection configured with this bot
854
851
:type connection_name: str
855
-
856
852
:param resource_urls: The list of resource URLs to retrieve tokens for
857
853
:type resource_urls: :class:`typing.List`
858
-
859
854
:returns: Dictionary of resource Urls to the corresponding :class:'botbuilder.schema.TokenResponse`
860
855
:rtype: :class:`typing.Dict`
861
856
"""
0 commit comments