-
Notifications
You must be signed in to change notification settings - Fork 486
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change HttpRequest to return an object with http response metadata
{ statusCode: 201 reasonPhrase: "Accepted", headers: {...response headers...} content: object|string }
- Loading branch information
Tom Laird-McConnell
committed
Aug 21, 2019
1 parent
a3ffe1a
commit 284ad73
Showing
12 changed files
with
218 additions
and
156 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
set npm_config_registry=https://botbuilder.myget.org/F/botframework-cli/auth/da91578f-5b61-4224-9c46-cb2522c66033/npm/ | ||
npm install -g @microsoft/botframework-cli@4.5.0-preview.76135 |
This file contains 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
This file contains 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
This file contains 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
2 changes: 1 addition & 1 deletion
2
tests/Microsoft.Bot.Builder.TestBot.Json/Samples/12 - GithubIssueBot/show.lg
This file contains 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
This file contains 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
This file contains 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
This file contains 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
76 changes: 38 additions & 38 deletions
76
...oft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Service/MSGraph/GetContactService.dialog
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,42 @@ | ||
{ | ||
"$schema": "../../../../app.schema", | ||
"$type": "Microsoft.AdaptiveDialog", | ||
"events": [ | ||
{ | ||
"$type": "Microsoft.OnBeginDialog", | ||
"actions": [ | ||
"$schema": "../../../../app.schema", | ||
"$type": "Microsoft.AdaptiveDialog", | ||
"events": [ | ||
{ | ||
"$type": "Microsoft.IfCondition", | ||
"condition": "dialog.token == null", | ||
"actions": [ | ||
{ | ||
"$type": "Microsoft.OAuthPrompt", | ||
"connectionName": "msgraph", | ||
"title": "Log in", | ||
"text": "Please log in to your Microsoft account", | ||
"property": "dialog.token" | ||
} | ||
] | ||
}, | ||
{ | ||
"$type": "Microsoft.HttpRequest", | ||
"url": "https://graph.microsoft.com/v1.0/me/contacts?$filter=startswith(displayName,'{user.email}')", | ||
"method": "GET", | ||
"headers": { | ||
"Authorization": "Bearer {dialog.token.Token}" | ||
}, | ||
"property": "dialog.getResponse" | ||
}, | ||
{ | ||
"$type": "Microsoft.SendActivity", | ||
"activity": "The contact you find is {dialog.getResponse.value[0].displayName}, email address is {dialog.getResponse.value[0].emailAddresses[0].address}." | ||
}, | ||
{ | ||
"$type": "Microsoft.SetProperty", | ||
"value": "dialog.getResponse.value[0].emailAddresses[0].address", | ||
"property": "user.email" | ||
"$type": "Microsoft.OnBeginDialog", | ||
"actions": [ | ||
{ | ||
"$type": "Microsoft.IfCondition", | ||
"condition": "dialog.token == null", | ||
"actions": [ | ||
{ | ||
"$type": "Microsoft.OAuthPrompt", | ||
"connectionName": "msgraph", | ||
"title": "Log in", | ||
"text": "Please log in to your Microsoft account", | ||
"property": "dialog.token" | ||
} | ||
] | ||
}, | ||
{ | ||
"$type": "Microsoft.HttpRequest", | ||
"url": "https://graph.microsoft.com/v1.0/me/contacts?$filter=startswith(displayName,'{user.email}')", | ||
"method": "GET", | ||
"headers": { | ||
"Authorization": "Bearer {dialog.token.Token}" | ||
}, | ||
"property": "dialog.getResponse" | ||
}, | ||
{ | ||
"$type": "Microsoft.SendActivity", | ||
"activity": "The contact you find is {dialog.getResponse.content.value[0].displayName}, email address is {dialog.getResponse.content.value[0].emailAddresses[0].address}." | ||
}, | ||
{ | ||
"$type": "Microsoft.SetProperty", | ||
"value": "dialog.getResponse.content.value[0].emailAddresses[0].address", | ||
"property": "user.email" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
] | ||
} |
56 changes: 28 additions & 28 deletions
56
...ft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Service/MSGraph/GetMeetingsService.dialog
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
{ | ||
"$schema": "../../app.schema", | ||
"$type": "Microsoft.AdaptiveDialog", | ||
"actions": [ | ||
{ | ||
"$type": "Microsoft.IfCondition", | ||
"condition": "dialog.token == null", | ||
"actions": [ | ||
"$schema": "../../app.schema", | ||
"$type": "Microsoft.AdaptiveDialog", | ||
"actions": [ | ||
{ | ||
"$type": "Microsoft.OAuthPrompt", | ||
"ConnectionName": "msgraph", | ||
"Title": "Log in", | ||
"Text": "Please log in to your calendar account", | ||
"Property": "dialog.token" | ||
"$type": "Microsoft.IfCondition", | ||
"condition": "dialog.token == null", | ||
"actions": [ | ||
{ | ||
"$type": "Microsoft.OAuthPrompt", | ||
"ConnectionName": "msgraph", | ||
"Title": "Log in", | ||
"Text": "Please log in to your calendar account", | ||
"Property": "dialog.token" | ||
} | ||
] | ||
}, | ||
{ | ||
"$type": "Microsoft.HttpRequest", | ||
"url": "https://graph.microsoft.com/v1.0/me/calendarview?startdatetime={utcNow()}&enddatetime={addDays(utcNow(), 1)}", | ||
"method": "GET", | ||
"header": { | ||
"Authorization": "Bearer {dialog.token.Token}" | ||
}, | ||
"Property": "user.getGraphMeetings" | ||
} | ||
] | ||
}, | ||
{ | ||
"$type": "Microsoft.HttpRequest", | ||
"url": "https://graph.microsoft.com/v1.0/me/calendarview?startdatetime={utcNow()}&enddatetime={addDays(utcNow(), 1)}", | ||
"method": "GET", | ||
"header": { | ||
"Authorization": "Bearer {dialog.token.Token}" | ||
}, | ||
"Property": "user.getGraphMeetings" | ||
} | ||
//,{ | ||
// "$type": "Microsoft.SendActivity", | ||
// "activity": "{user.getGraphMeetings}" | ||
//} | ||
] | ||
//,{ | ||
// "$type": "Microsoft.SendActivity", | ||
// "activity": "{user.getGraphMeetings.content}" | ||
//} | ||
] | ||
} |
Oops, something went wrong.