-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
77 additions
and
50 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System.Text.Json; | ||
public static class JsonElementExtension | ||
{ | ||
public static JsonElement? GetPropertyExt(this JsonElement jsonElement, string propertyName) | ||
{ | ||
if (jsonElement.TryGetProperty(propertyName, out JsonElement returnElement)) | ||
{ | ||
return returnElement; | ||
} | ||
else | ||
{ | ||
return null; | ||
} | ||
} | ||
|
||
} |
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Empty file.
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,36 @@ | ||
Leaving Main method. | ||
Starting Main Menu | ||
In MainMenu() | ||
Automatically looking up user entered word: | ||
coputer | ||
Found that QueryMode is set to words. | ||
Looking up the word: | ||
coputer | ||
Now to call the words endpoint. | ||
Getting request keys | ||
resetHeaders called. | ||
App Id is: | ||
4ebc819b | ||
Key is: | ||
b6b1ca0e4e766b222d56c20f43c2396f | ||
Here are the request Headers... | ||
Accept: application/json | ||
app_id: 4ebc819b | ||
app_key: b6b1ca0e4e766b222d56c20f43c2396f | ||
|
||
Calling the API | ||
Called callWordsAPI | ||
Making the request | ||
Got responses. | ||
Set JSONResponse to the response. | ||
Left getWords task with the JSONResponse. | ||
Parsing JSON | ||
We now have the data as a string. | ||
[] | ||
Extracted definition. | ||
Set definition to query object. | ||
Now to get and set the word ID. | ||
The wordID was grabbed as: | ||
The user's input was read as: | ||
x | ||
Exit selected. |
Empty file.
Empty file.
Empty file.
Empty file.
Binary file not shown.
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 +1 @@ | ||
dcef1070ebd692bec2967bc0e06c8795a1f10ff9 | ||
8cd677e6c6a9f31363765b5823023fe7a43d0a9b |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.