12.2 Assignment

Overview

12.2 Assignment

Using the 12.1 Assignment, 12.2 Lab, and assigned readings as reference, you will build your own .NET Framework console application using the third party API that you received access to in 12.1 Assignment and the POST and GET calls utilized in Postman in the 12.1 Assignment.

Work through the stories in order. Use the acceptance criteria to check each feature, and complete the nested tasks using the specified names, values, and scenarios.

Prepare the API client
1.Create a new .NET Framework Console App to be used to invoke calls to the API that you registered for in 12.1 Assignment.
A Create a new .NET Framework Console App to be used to invoke calls to the API that you registered for in 12.1 Assignment.
2.Configure your app.config connection strings and app settings to include the base API path and your access token.
A Configure your app.config connection strings and app settings to include the base API path and your access token.
3.Create an API Manager class to manage your API connection string, key, and any other access tokens needed.
A Create an API Manager class to manage your API connection string, key, and any other access tokens needed.
Model request and response data
Acceptance Criteria
Acceptance criteria
  • DTO classes match the chosen API’s JSON and use JsonProperty mappings where needed.
  • Application models convert transport data into useful values.
Instructions
4.Create data transfer object classes in a DTO folder as needed to hold data received and to be sent from Get and POST…

Create data transfer object classes in a DTO folder as needed to hold data received and to be sent from Get and POST requests. You should model these classes after the JSON objects received from your GET requests, and sent in your POST requests from Postman in the 12.1 Assignment.

Use JSONProperty attributes.

A Create data transfer object classes in a DTO folder as needed to hold data received and to be sent from Get and POST…

Create data transfer object classes in a DTO folder as needed to hold data received and to be sent from Get and POST requests. You should model these classes after the JSON objects received from your GET requests, and sent in your POST requests from Postman in the 12.1 Assignment.

5.Create classes in a Models folder, as needed, to convert from a data transfer object class to a more user friendly class.
A Create classes in a Models folder, as needed, to convert from a data transfer object class to a more user friendly class.
Send GET and POST requests from a menu
Acceptance Criteria
Acceptance criteria
  • APIController owns the required HttpClient configuration.
  • At least two GET methods and one POST method are implemented.
  • The console menu invokes these methods, displays results, and clears between selections as directed.
Instructions
6.Create a new APIController in a new Controllers folder.
A Create and initialize an HttpClient for both GET and POST requests at the field level.
B Create an APIManager auto-property with a getter and a setter.
C Create a method to send GET requests using HttpClient.
D Create an overloaded method to send POST requests using HttpClient.
E Create at least 2 methods to call GET requests. These should be the same GET calls that you used in the 12.1 Assignment.
F Create at least 1 method to call a POST request. This should be the same POST call that you used in the 12.1 Assignment.
7.In the Program class
A Get the application connection settings from the app.config file.
B Initialize a new instance of the APIManager and pass in the necessary connection properties retrieved from the app.config…

Initialize a new instance of the APIManager and pass in the necessary connection properties retrieved from the app.config file in the previous step.

C Set up your console application to accept input from the user that will invoke both of the two previously created GET…

Set up your console application to accept input from the user that will invoke both of the two previously created GET requests, and one of the POST requests. There should be clear instruction on what the user should input and what the expected output should be.

Submit the API client
8.Zip and submit the zipped file.
A Zip and submit the zipped file.
Completion review
9.Review the feature acceptance criteria
A Confirm the required results

Return to each story and verify its acceptance criteria. Preserve the submission format and destination stated in the activity; a reading, setup guide, lab, video demonstration, and oral final may require different evidence.

Model request and response data Send GET and POST requests from a menu