Hello guys, welcome to the 24th session of the API dot A tutorials for beginner. In this lesson, we will see how to use the dotnet SDK to create your own client. Let's switch to the Visual Studio. I will use the console app for that. However, you can use the Windows desktop app as we don't have a universal app or any other app supported by the dotnet framework or dotnet core. So I am click on the Create New Project.
Select the console app for the dotnet framework and write the name dotnet client and hit the Enter We need to use the nugget packet or the Apa ta ta. For that, right click on the project and select the Manage nougat packages. Click on the browse and search for the epi EA. And select the EPA SDK and click on the install your nougat package was installed. Let's open the program.cs file. First of all, I'm going to add the using statement for the API or the SDK, as well as API Dotty SDK dot models.
And create an instance of the API AI name agent According to new TPA, which will take the configuration as a parameter, so right the new configuration which will take the client access token and the supporter language copy the token from the apa.ca and paste it and here are supported language for my eyes and will be the English here I am printing the welcome message so the console dot write line Welcome to APA da da, c suppliant. And use the while loop to create the infinite loop. One why true Within that I will present to you so user we see this and type the query here. Then read through the query from the emulator, the query that user type for that five years saying query equal to console dot readline. And get the response. By sending a request by the year or agent who can send the type of request, tax and the voice.
I'm going to use the text and pass the query it via our response to our status dot code equal equal 200. Then we display the original response. So Idea console dot write line and display the boat and do the response door wizard dot fulfillment dot speech as we will display the response dot status dot error details, save it and run the project. Now I'm going to send the hi we got the hider and I'm going to send the sum of 10 and eight We got the answer. That's it. Let's see what we are learning in this session.
Here we are in short the API SDK from the nugget and a create instance of APA. And then by using the text request, send the query request to the APA and open the original response from the result or fulfillment dot speech. Thanks for watching, have a nice day. If you have any doubt, feel free to contact me