Skip to content

Latest commit

 

History

History
82 lines (50 loc) · 4.16 KB

readme_old.md

File metadata and controls

82 lines (50 loc) · 4.16 KB

JishoNET

JishoNET

Thank you for 2K downloads of JishoNET!


API Wrapper for the Jisho API (v1)

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


Downloads

Stable builds can be found here: NuGet


Usage

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

Create an instance of the JishoClient

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.

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.

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.


The Meta object contains one property called Status. This property contains the Http Response Code (e.g. 200 or 404)


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
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

* can be empty

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.