Skip to content

Commit

Permalink
ReadMe Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Myuuiii committed Apr 8, 2022
1 parent c62a694 commit b150b29
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

## Downloads

**Stable builds can be downloaded here: ** [GitHub Releases](https://github.com/Myuuiii/JishoNET/releases) and [Nuget.org](https://www.nuget.org/packages/JishoNET/)
**Stable builds can be downloaded here: ** [GitHub Releases](https://github.com/Myuuiii/JishoNET/releases) and [Nuget.org](https://www.nuget.org/packages/JishoNET/)

**Development builds can be downloaded here:** [GitHub Releases](https://github.com/Myuuiii/JishoNET/releases)

Expand Down
22 changes: 13 additions & 9 deletions readme_old.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


<div align="center">

![JishoNET](http://cdn.mutedevs.nl/nuget/JishoNET/iconSmall.png)
Expand All @@ -14,42 +12,48 @@ Thank you for 2K downloads of JishoNET!

</div>



This wrapper makes it easy to get definitions from Jisho.
Jisho is a powerful Japanese-English dictionary and lets you find words, kanji and example sentences quickly and easily [Jisho Website](https://jisho.org/)
Jisho is a powerful Japanese-English dictionary and lets you find words, kanji and example sentences quickly and easily [Jisho Website](https://jisho.org/)

<br>

# Downloads

**Stable builds can be found here**:
[NuGet](https://www.nuget.org/packages/JishoNET/)

<br>

# Usage

To get a definition from the Jisho API here's what you should do:

## Create an instance of the JishoClient

```cs
JishoClient client = new JishoClient();
```

Using this client you can start retrieving definitions.

## Retrieving a definition

On the instance of `JishoClient` you just created you can execute the `GetDefinition` method. As the argument for this method you provide the "keyword" to use in the search. This can be any English or Japanese word. The `GetDefinition` returns a `JishoResult` which will contain all the data sent back by the API.

```cs
JishoResult result = client.GetDefinition("house");
```

## Retrieving a quick definition

A quick definition contains the top result from a query, the result will contain an English `Sense` object and a `Japanese` reading object.

```cs
JishoQuickDefinition qDefinition = client.GetQuickDefinition("house");
```


## Reading the data

The root object of type `JishoResult` contains a `Meta` and `Data` property alongside the `Success` and `Exception` property which will return the exception if anything goes wrong during the creation and execution of the API call. This is purely for development purposes and if you manage to throw an exception let me know.

<br>
Expand All @@ -60,13 +64,12 @@ The `Meta` object contains one property called `Status`. This property contains

The `Data` list of objects contains all the definitions that were returned using your search query. Every `JishoData` object contains:


| Property | |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Slug | The slug is the set of Kanji or Kana characters of the word you requested |
| IsCommon | Indicates if the requested word is common in the Japanese Language |
| Tags | Ay tags that have been added to the definition |
| Jlpt* | Indicates in which level of the Japanese Language Proficiency Test this word will start appearing |
| Jlpt\* | Indicates in which level of the Japanese Language Proficiency Test this word will start appearing |
| Japanese | All the Japanese reading for the word, this property contains a list of objects where `Word` is most often the reading in kanji and `Reading` is the reading written in kana characters. |
| Senses | All the English definitions of the word. This property contains an object with: All English Definitions, Parts of speech (e.g. "Noun"), Links, Tags, Restrictions, SeeAlso, Antonyms, Source, Info and Sentences |
| Attribution | Contains attribution data |
Expand All @@ -75,4 +78,5 @@ The `Data` list of objects contains all the definitions that were returned using
<br><br>

# Information
If anything's not working feel free to create an issue and I'll take a look at it! I'll try to keep this wrapper working if the API updates.

If anything's not working feel free to create an issue and I'll take a look at it! I'll try to keep this wrapper working if the API updates.

0 comments on commit b150b29

Please sign in to comment.