You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -24,6 +24,9 @@ If you’re just getting started, check out the [Microsoft identity platform doc
24
24
25
25
Use the following checklist to ensure that your application is effectively integrated with the [Microsoft identity platform](https://docs.microsoft.com/azure/active-directory/develop/).
26
26
27
+
> [!TIP]
28
+
> The *Integration assistant* in the Azure portal can help you apply many of these best practices and recommendations. Select any of your [app registrations](https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade) in the Azure portal, and then select the **Integration assistant (preview)** menu item to get started with the assistant.
Copy file name to clipboardExpand all lines: articles/cognitive-services/Bing-Image-Search/quickstarts/csharp.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,12 @@ manager: nitinme
8
8
ms.service: cognitive-services
9
9
ms.subservice: bing-image-search
10
10
ms.topic: quickstart
11
-
ms.date: 03/31/2020
11
+
ms.date: 05/08/2020
12
12
ms.author: aahi
13
13
---
14
14
# Quickstart: Search for images using the Bing Image Search REST API and C#
15
15
16
-
Use this quickstart to start sending search requests to the Bing Image Search API. This C# application sends a search query to the API, and displays the URL of the first image in the results. While this application is written in C#, the API is a RESTful web service compatible with most programming languages.
16
+
Use this quickstart to learn how to send search requests to the Bing Image Search API. This C# application sends a search query to the API, and displays the URL of the first image in the results. Although this application is written in C#, the API is a RESTful web service compatible with most programming languages.
17
17
18
18
The source code for this sample is available [on GitHub](https://github.com/Azure-Samples/cognitive-services-REST-api-samples/blob/master/dotnet/Search/BingImageSearchv7Quickstart.cs) with additional error handling and annotations.
19
19
@@ -26,7 +26,7 @@ The source code for this sample is available [on GitHub](https://github.com/Azur
26
26
27
27
## Create and initialize a project
28
28
29
-
1.create a new console solution named `BingSearchApisQuickStart` in Visual Studio. Then add the following namespaces into the main code file.
29
+
1.Create a new console solution named `BingSearchApisQuickStart` in Visual Studio. Then, add the following namespaces to the main code file:
30
30
31
31
```csharp
32
32
usingSystem;
@@ -36,7 +36,7 @@ The source code for this sample is available [on GitHub](https://github.com/Azur
36
36
usingNewtonsoft.Json.Linq;
37
37
```
38
38
39
-
2. Createvariablesfor the API endpoint, your subscription key, and search term. `uriBase`can be the global endpoint below, or the [custom subdomain](../../../cognitive-services/cognitive-services-custom-subdomains.md) endpointdisplayedintheAzureportalfor your resource.
39
+
2. Createvariablesfor the API endpoint, your subscription key, and search term. For `uriBase`, you can use the global endpoint in the following code, or use the [custom subdomain](../../../cognitive-services/cognitive-services-custom-subdomains.md) endpointdisplayedintheAzureportalfor your resource.
40
40
41
41
```csharp
42
42
//...
@@ -53,7 +53,7 @@ The source code for this sample is available [on GitHub](https://github.com/Azur
53
53
54
54
## Create a struct to format the Bing Image Search response
55
55
56
-
Definea `SearchResult` structto contain the image search results, and JSON header information.
56
+
Definea `SearchResult` structto contain the image search results and JSON header information.
57
57
58
58
```csharp
59
59
namespace BingSearchApisQuickstart
@@ -71,7 +71,7 @@ Define a `SearchResult` struct to contain the image search results, and JSON hea
71
71
72
72
## Create a method to send search requests
73
73
74
-
Create a method named `BingImageSearch` to perform the call to theAPI, andsetthereturntypetothe `SearchResult` structcreatedearlier.
74
+
Create a method named `BingImageSearch` to perform the call to theAPI, andsetthereturntypetothe `SearchResult` structcreatedpreviously.
# Quickstart: Search for images with the Bing Image Search API, an Azure cognitive service
16
+
# Quickstart: Search for images with the Bing Image Search API and Java
17
17
18
-
Use this quickstart to send search requests to the Bing Image Search API in Azure Cognitive Services. This Java application sends a search query to the API, and displays the URL of the first image in the results. While this application is written in Java, the API is a RESTful web service compatible with most programming languages.
18
+
Use this quickstart to learn how to send search requests to the Bing Image Search API in Azure Cognitive Services. This Java application sends a search query to the API, and displays the URL of the first image in the results. Although this application is written in Java, the API is a RESTful web service compatible with most programming languages.
19
19
20
20
The source code for this sample is available [on GitHub](https://github.com/Azure-Samples/cognitive-services-REST-api-samples/blob/master/java/Search/BingImageSearchv7Quickstart.java) with additional error handling and annotations.
21
21
@@ -29,7 +29,7 @@ The source code for this sample is available [on GitHub](https://github.com/Azur
29
29
30
30
## Create and initialize a project
31
31
32
-
1. Create a new Java project in your favorite IDE or editor, and import the following libraries.
32
+
1. Create a new Java project in your favorite IDE or editor, and import the following libraries:
33
33
34
34
```java
35
35
importjava.net.*;
@@ -42,7 +42,7 @@ The source code for this sample is available [on GitHub](https://github.com/Azur
42
42
importcom.google.gson.JsonParser;
43
43
```
44
44
45
-
2.Create variables for the API endpoint, your subscription key, and search term. `host`can be the global endpoint below, or the [custom subdomain](../../../cognitive-services/cognitive-services-custom-subdomains.md) endpoint displayed in the Azure portal for your resource.
45
+
2.Create variables for the API endpoint, your subscription key, and search term. For`host`, you can use the global endpoint in the following code, or use the [custom subdomain](../../../cognitive-services/cognitive-services-custom-subdomains.md) endpoint displayed in the Azure portal for your resource.
46
46
47
47
```java
48
48
staticString subscriptionKey ="enter key here";
@@ -53,7 +53,7 @@ The source code for this sample is available [on GitHub](https://github.com/Azur
53
53
54
54
## Construct the search request and query
55
55
56
-
1.Use the variables from the last step to format a search URLfor the API request. Thesearch term must be URL-encoded before being appended to the request.
56
+
Use the variables from the previous step to format a search URLfor the API request. URL-encode the search term before you appended it to the request.
57
57
58
58
```java
59
59
// construct the search request URL (in the form of endpoint + query string)
@@ -64,7 +64,7 @@ The source code for this sample is available [on GitHub](https://github.com/Azur
64
64
65
65
## Receive and process the JSON response
66
66
67
-
1.Receive the JSON response from the BingImageSearchAPI, and construct the result object.
67
+
1.Receive the JSON response from the BingImageSearchAPI and construct the result object.
68
68
69
69
```java
70
70
// receive JSON body
@@ -73,7 +73,8 @@ The source code for this sample is available [on GitHub](https://github.com/Azur
0 commit comments